06-25-2024
femiajumobi1
Quartz | Level 8
Member since
10-18-2022
- 46 Posts
- 7 Likes Given
- 1 Solutions
- 2 Likes Received
-
Latest posts by femiajumobi1
Subject Views Posted 587 03-27-2024 06:22 PM 1670 02-09-2024 10:58 AM 1731 02-09-2024 09:40 AM 1738 02-09-2024 09:32 AM 1790 02-09-2024 08:08 AM 1516 02-05-2024 02:53 PM 1531 02-05-2024 02:32 PM 1558 02-05-2024 01:28 PM 1606 02-05-2024 12:10 PM 5786 01-29-2024 02:06 PM -
Activity Feed for femiajumobi1
- Liked Re: keeping only content within the 2nd set of parentheses for Astounding. 03-27-2024 09:07 PM
- Posted keeping only content within the 2nd set of parentheses on New SAS User. 03-27-2024 06:22 PM
- Posted Re: Count number options in different questionnaire options on New SAS User. 02-09-2024 10:58 AM
- Liked Re: Count number options in different questionnaire options for data_null__. 02-09-2024 10:58 AM
- Liked Re: Count number options in different questionnaire options for FreelanceReinh. 02-09-2024 10:58 AM
- Posted Re: Count number options in different questionnaire options on New SAS User. 02-09-2024 09:40 AM
- Posted Re: Count number options in different questionnaire options on New SAS User. 02-09-2024 09:32 AM
- Posted Count number options in different questionnaire options on New SAS User. 02-09-2024 08:08 AM
- Posted Re: transforming from long to wide on New SAS User. 02-05-2024 02:53 PM
- Liked Re: transforming from long to wide for Tom. 02-05-2024 02:39 PM
- Posted Re: transforming from long to wide on New SAS User. 02-05-2024 02:32 PM
- Posted Re: transforming from long to wide on New SAS User. 02-05-2024 01:28 PM
- Posted transforming from long to wide on New SAS User. 02-05-2024 12:10 PM
- Posted Re: format to one decimal place and still retain the decimal place for integer (whole number) on New SAS User. 01-29-2024 02:06 PM
- Posted Re: format to one decimal place and still retain the decimal place for integer (whole number) on New SAS User. 01-29-2024 01:23 PM
- Posted Re: format to one decimal place and still retain the decimal place for integer (whole number) on New SAS User. 01-29-2024 12:55 PM
- Posted Re: format to one decimal place and still retain the decimal place for integer (whole number) on New SAS User. 01-29-2024 12:52 PM
- Posted format to one decimal place and still retain the decimal place for integer (whole number) on New SAS User. 01-29-2024 12:22 PM
- Posted Re: Search for alphanumeric variables in a sea of text on New SAS User. 10-14-2023 01:36 PM
- Posted Re: Search for alphanumeric variables in a sea of text on New SAS User. 10-13-2023 04:42 PM
-
Posts I Liked
Subject Likes Author Latest Post 1 1 1 1 3 -
My Liked Posts
Subject Likes Posted 2 10-18-2022 02:12 PM
03-27-2024
06:22 PM
In the column "event" My goal is to keep only 4010, but column event has COMBINED VISIT (-334 & -324) (4010)
The code below returned only VISIT. But I am interested in 4010
data want;
Set have;
redundant=scan(event,1,' ');
event=scan(event,2,' ');
drop redundant ;
run;
... View more
02-09-2024
10:58 AM
This works. Super-efficient codes. Thanks.
... View more
02-09-2024
09:40 AM
They are numeric variables (proc contents). Please note am recoding with "OR" to capture in any of the QN where a any numeric from 1 to 30 is mentioned
... View more
02-09-2024
09:32 AM
Both QN1 and QN2 are numeric variables type (Num), Len (8), Format (BEST.)
... View more
02-09-2024
08:08 AM
Hi. In same data A, I would like to count those who answer the number of days to each question for the use of cigarette or marijuana which can range from 0-30 in QN1 and QN2, and code them into any_user . Please note apart from any number from 0 to 3 there are character options to question stem such as 'N' for not answered and 'Z' for skipped.
QN1: During the past 30 days, on how many days did you use e-cigarettes?
N
Z
0
1
2
3
QN2: During the past 30 days, on how many days did you use marijuana?
N
Z
0
1
2
3
Data A,
if QN1 in (1-30) or QN2 in (1-30) then any_sub_user=1;
else any_sub_user=2;
run;
... View more
02-05-2024
02:32 PM
Thanks but How do I drop AGE from AGE1 AGE2 AGE3? I want to have the columns as: 1 2 3 instead of AGE1 AGE2 AGE3
... View more
02-05-2024
01:28 PM
On adding the prefix =AGE it gives beyond what is required age1 age2 age3 ...........age_n My goal is to make the data wide with the counties as column, ages 1-3 as column and the content of the ages1-3 should be the population which I have to sum up in another column. First step is to get the population for each age to reflect within the ages pivoted wide. Thanks
... View more
02-05-2024
12:10 PM
Hi I am trying to transpose the population data below from long (data A) to wide (data B)
Data A.
age pop counties
1 10 A
2 5 A
3 7 A
1 6 B
2 4 B
3 5 B
1 8 C
2 9 C
3 6 C
I want to to look like this (counties, numeric of age (1 2 3), sum total of age by county (total):
Data B.
Counties 1 2 3 total
A 10 5 7 22
B 6 4 5 15
C 8 9 6 23
But the code below is not working. Thank you
proc transpose data=A out=B;
by counties;
id age;
var pop;
run;
... View more
01-29-2024
02:06 PM
I saw these in the log.
Again I am interested in formatting every number to one decimal place including integers. For example I want SAS to retain 10 as 10.1 when I export the file in csv and 10.
... View more
01-29-2024
01:23 PM
Thanks @ballardw Back to my question, how do I ensure in csv the value comes with one decimal point (5.0) and not default back to an integer (5). Thanks.
... View more
01-29-2024
12:55 PM
I opened the csv in the folder it was saved directly. The CSV file opens as csv in a spreadsheet. I am not sure what you meant by not defaulting to open in excel.
... View more
01-29-2024
12:52 PM
This did not address it. The value did not retain decimal after integer, 5 remains 5 instead of 5.0
... View more
01-29-2024
12:22 PM
Hi. I am creating a dataset and I need a column to retain one decimal place for every value (including integers and thoses I rounded off to once decimal place). In the work library it retains the decimal point but it keeps reformatting integers to whole number when I export in csv. For example, I want 5 to be 5.0 and not 5. I tried these codes below but the csv keeps formatting back to integers: 1, 5, 7 etc.
data new;
set old;
format Measure 13.1;
run;
data new;
set old;
format Measure 13.1;
Measure=round(Measure,0.1)
run;
proc export data=new dbms=csv
outfile="C:\Desktop\new.csv."
replace;
run
Thank you
... View more
10-14-2023
01:36 PM
@Patrick
This found the variables but ascribed zero to all of them
data want;
set have;
if diagnoses in: ('J45.10', 'J45.20', 'J45.30') then AI=1;
else AI=0;
run;
I switched it with AI =0 if any of the variables are found (see below) and it correctly ascribed 1 to all of them. It's weird! I want to ascribe AI=1 in any cell it finds 'J45.10', 'J45.20', 'J45.30' and AI=0 otherwise
I have over 14,000 observations with a column 'diagnoses' which has text information beyond these alphanumeric variables: 'J45.10', 'J45.20', 'J45.30' and I wish to find where this exist in each diagnoses cell. Thanks
data want;
set have;
if diagnoses in: ('J45.10', 'J45.20', 'J45.30') then AI=0;
else AI=1;
run;
... View more