07-31-2018
alilacey0
Fluorite | Level 6
Member since
09-26-2017
- 6 Posts
- 1 Likes Given
- 0 Solutions
- 0 Likes Received
-
Latest posts by alilacey0
Subject Views Posted 1074 07-31-2018 02:25 AM 1308 07-15-2018 09:55 PM 2347 07-15-2018 09:21 PM 2369 07-15-2018 07:42 PM 5990 09-26-2017 11:25 PM 6036 09-26-2017 07:48 PM -
Activity Feed for alilacey0
- Posted like '[2-9]' not working on SAS Studio. 07-31-2018 02:25 AM
- Tagged like '[2-9]' not working on SAS Studio. 07-31-2018 02:25 AM
- Posted proc rank on SAS Programming. 07-15-2018 09:55 PM
- Posted Re: Euclids Algorithm in do while loop on SAS Programming. 07-15-2018 09:21 PM
- Posted Euclids Algorithm in do while loop on SAS Programming. 07-15-2018 07:42 PM
- Liked Re: How to find the number of Sundays between two dates? for error_prone. 09-28-2017 09:49 AM
- Posted Re: How to find the number of Sundays between two dates? on SAS Studio. 09-26-2017 11:25 PM
- Posted How to find the number of Sundays between two dates? on SAS Studio. 09-26-2017 07:48 PM
-
Posts I Liked
Subject Likes Author Latest Post 1
07-31-2018
02:25 AM
I am trying to find any row that contains a number from 2-9 in it in proc sql. I have tried multiple solutions and have researched other peoples questions on this topic and nothing seems to produce a result for me. Here is what I have tried: proc sql; select * from one where Make like '%[2-9]%'; run; proc sql; select * from one where Make like '[2-9]'; run; proc sql; select * from one where Make like '.[2-9].'; run; proc sql; select * from one where Make contains '[2-9]'; run; proc sql; select * from one where Make like '.*[2-9]*.'; run; None of these seem to produce any results for me. Thank you in advance for any help.
... View more
- Tags:
- sql
07-15-2018
09:55 PM
I have a dataset similar to data NATR332; input Y1 Y2; datalines; 146 141 141 143 135 139 142 139 140 140 143 141 138 138 137 140 142 142 136 138 run; I used proc sql to find the difference between Y1 and Y2 and removed the rows where the difference is = 0 by using the code proc SQL; /*create table temp as*/ select *, Y1 - Y2 as Difference, from NATR332 where (Y1-Y2 ^= 0) ; I now want to create a new column called rank where I rank the absolute value of the differences. I tried to use the rank () over partition in proc sql and didn't have any luck so I was thinking I would maybe have to use the proc rank function. How would I go about creating this column? Thank you in advance.
... View more
07-15-2018
09:21 PM
I am trying to familiarize myself with a do while loop and I am able to check my work with the gcd function. So I would like to create my own function with the do while loop inside of a function, almost like "for practice" so I am able to expand on loops, but I am aware of the gcd function.
... View more
07-15-2018
07:42 PM
I have worked in sas for a little over a year now off and on so I would still consider myself fairly new to the language. I am trying to compute Euclids Method to find the gcd using a do while loop in sas. I have never enjoyed loops, but I did take a stab at the loop and I pasted my code below. I do know that Euclids Method goes as follows: 1. a = b, then a (or b) 2. a>b, then gcd(a-b, b) 3. a<b, then gcd(a, b-a) I am trying to test the code on two random values like 18 and 48 for example. I want to be able to change a and b to whatever numbers I would like. My starting code is below. Any help would be greatly appreciated. Thank you in advance. proc iml; start func(a, b); /*start function*/ do while(b != 0); t = b; b = mod(a,b); a = t; output; end; return(?); /*? unsure what to put here*/ finish(func); run; quit;
... View more
09-26-2017
11:25 PM
this is what I have so far, but we are having troubles getting the days of the week for 2017 I attached some of our results as well (this does not run) data dates; do i=1 to 365; Sundays = intck('weekday', '01Jan2017'd, '31Dec2017'd); day = weekday(week); run; title "Number of Each Day of the Week in 2017"; proc print data == dates noobs; var week Day -- Year; run; (this does run but not able to get any further, results are attached) data days; do i=0 to 365; Day = intck('week', '01Jan2017'd, '31Dec2017'd); end; run; title "Listing of Days of the Week for 2017"; proc print data=days noob; run;
... View more
09-26-2017
07:48 PM
Using appropriate SAS DATE functions and maybe PROC FREQ, find a frequency table containing the number of Sundays (1), Mondays (2), ...., Saturdays (7) in the year 2017. You can enter your data/dates in any format you want.
... View more