09-24-2024
sahoositaram555
Pyrite | Level 9
Member since
10-08-2016
- 150 Posts
- 32 Likes Given
- 1 Solutions
- 1 Likes Received
-
Latest posts by sahoositaram555
Subject Views Posted 674 09-23-2024 11:49 PM 678 09-23-2024 11:46 PM 698 09-23-2024 11:19 PM 1610 07-24-2024 09:13 AM 1648 07-24-2024 09:05 AM 1666 07-24-2024 08:52 AM 614 08-17-2023 03:43 PM 1727 08-15-2023 05:04 PM 1743 08-15-2023 04:56 PM 767 08-15-2023 02:59 PM -
Activity Feed for sahoositaram555
- Posted Re: Add a blank row below a row in a dataset on SAS Programming. 09-23-2024 11:49 PM
- Posted Re: Add a blank row below a row in a dataset on SAS Programming. 09-23-2024 11:46 PM
- Posted Add a blank row below a row in a dataset on SAS Programming. 09-23-2024 11:19 PM
- Liked Re: how to do sum of the rows and place the results in below blank row by using datasetp for Ksharp. 07-25-2024 05:42 AM
- Posted Re: how to do sum of the rows and place the results in below blank row by using datasetp on SAS Programming. 07-24-2024 09:13 AM
- Posted Re: how to do sum of the rows and place the results in below blank row by using datasetp on SAS Programming. 07-24-2024 09:05 AM
- Posted how to do sum of the rows and place the results in below blank row by using datasetp on SAS Programming. 07-24-2024 08:52 AM
- Posted Creating multiple numeric columns from multiple character columns on SAS Programming. 08-17-2023 03:43 PM
- Posted Re: identify records which are coming maximum twice (only if coming in 1st 2 rows) on SAS Programming. 08-15-2023 05:04 PM
- Posted identify records which are coming maximum twice (only if coming in 1st 2 rows) on SAS Programming. 08-15-2023 04:56 PM
- Posted Re: how flag the first record when 2 values are same when we have with multiple observations in data on SAS Programming. 08-15-2023 02:59 PM
- Posted how flag the first record when 2 values are same when we have with multiple observations in data on SAS Programming. 08-15-2023 02:46 PM
- Posted Re: How to identify/flag the first row of repetition(if repeats at least 3 times) on SAS Programming. 08-15-2023 02:33 AM
- Posted How to identify/flag the first row of repetition(if repeats at least 3 times) on SAS Programming. 08-15-2023 01:42 AM
- Posted identify rows containing decimals in a numeric column(with out converting in to a character column) on SAS Programming. 09-29-2021 03:34 PM
- Liked Re: categorize a variable for AKHILA. 09-07-2021 10:52 AM
- Posted categorize a variable on SAS Programming. 08-10-2021 04:25 PM
- Posted Re: convert observations in to 1 row on SAS Programming. 06-11-2021 01:13 AM
- Posted convert observations in to 1 row on SAS Programming. 06-10-2021 04:47 AM
- Posted Option in proc import to identify rows those were Strike through on SAS Programming. 03-30-2021 12:41 PM
-
Posts I Liked
Subject Likes Author Latest Post 1 1 1 1 1 -
My Liked Posts
Subject Likes Posted 1 03-17-2020 01:18 PM
09-23-2024
11:49 PM
@Patrick, I appreciate your reponse, i created this dummy dataset just to post as an example. by using call missing(col1) is not the intention, instead in a dataset level how can i manage to add a blank line when ever the col1 finds a PLACEBO CONTROLLED ?
... View more
09-23-2024
11:46 PM
Even though the ultimate goal is reporting, but i want to have the blank line at the dataset level as shown in the attached snap.
... View more
09-23-2024
11:19 PM
Hi All, i have a dataset as below.
data dummy; length col1 $200; col1="BASELINE Heart Rate";output; col1='PLACEBO-CONTROLLED Heart Rate';output; col1='WEEK 2 Heart Rate';output; col1='WEEK 4 Heart Rate';output; col1='WEEK 8 Heart Rate';output; col1='WEEK 12 Heart Rate';output; col1='WEEK 18 Heart Rate';output; col1='BASELINE SYSBP';output; col1='PLACEBO-CONTROLLED SYSBP';output; col1='WEEK 2 SYSBP';output; col1='WEEK 4 SYSBP';output; col1='WEEK 8 SYSBP';output; col1='WEEK 12 SYSBP';output; col1='WEEK 18 SYSBP';output; col1='BASELINE DIABP';output; col1='PLACEBO-CONTROLLED DIABP';output; col1='WEEK 2 DIABP';output; col1='WEEK 4 DIABP';output; col1='WEEK 8 DIABP';output; col1='WEEK 12 DIABP';output; col1='WEEK 18 DIABP';output; RUN;
I would like to insert 1 blank row each below the rows PLACEBO-CONTROLLED Heart Rate, PLACEBO-CONTROLLED SYSBP, PLACEBO-CONTROLLED DIABP.
how this can be achieved, please suggest, I heard call missing would work, but unable to do so.
... View more
07-24-2024
09:13 AM
It's fine if the sum value is coming in a new column along with the prerequisite values, but the intention is not to disturb the rows. i.e. basically for monday, monday 13 13 monday 12 12 tuesday . 25 something like above would work too!
... View more
07-24-2024
09:05 AM
@PaigeMiller, at the moment the data structure is like this and it would be great if i get help to find a solution for a sum value for the total row which makes the further downstream work much easier.
... View more
07-24-2024
08:52 AM
data xyz;
input var1 var2;
monday 13
monday 12
total .
tuesday 10
tuesday 23
total .
wednesday 34
wednesday 43
total .
run;
how to get the sum of by using var1 and place the results for total rows in var2 in data step?
i.e. no proc procedure/proc sql i shall use to get the answer.
... View more
08-17-2023
03:43 PM
I have this below dataset
data have; input col1 $1-8 col2 $9-16 col3 $17-25 col4 $26-34 col5 $35-41; datalines; 5(25.8) 2(6.25) 8(25.0) 10(14.4) 9(25.8) 56(12.3) 1(3.13) 19(14.4) 56(12.3) 0 87(6.0) 1(3.13) 11(34.4) 1(3.13) 0 90(87.0) 2(6.25) 1(3.13) 1(3.13) 0 ; run;
I would like to take the nuemric part from each of these columns exist, and create nuemric columns for each that contains only the value before bracket starts "(".
eg: for the 1st row there will be 5 numeric columns with value in first column will be 5 and in the last column the value will be 9.
I have written a code to solve this,
data want;
set have;
array char(*) COL1 COL2 COL3 COL4 COL5; /*columns I have */ array new(*) COL1N COL2N COL3N COL4N COL5N;/*numeric columns to be produced*/
do i=1 to dim(char); if char[i] ~="" then new[i]=scan(char[i],1,'('); end;
run;
but I'm getting ERROR: Array subscript out of range at line 35 column 22.
and for the last column since I have '0', need to add a consition to handle the same.
... View more
08-15-2023
05:04 PM
Hi @Astounding, the flag must appear on the first and second row(not any other rows), if it satisfies the condition that the repeat should be ONLY ON 1ST and 2ND row for COL2. if repeat value flows to 3rd rows and afterwards, ignore that col1 category .
should be as below
data have;
input col1 col2 col3;
datalines;
1001 1.5 ""
1001 1.5 ""
1001 1.5 ""
1001 1.5 ""
1001 1.5 "" 1001 7 "" 1001 8 "" 1002 4.25 "Y"
1002 4.25 "Y"
1002 2.5 ""
1002 2.5 ""
1002 2.5 "" 1002 2.5 "" 1002 1.5 "" 1003 6.5 "Y"
1003 6.5 "Y"
1003 1.5 ""
1003 1.5 ""
1003 1.5 "" 1003 1.5 "" 1003 1.5 "" 1003 8.7 "" 1004 8.7 ""
1004 8.7 ""
1004 8.7 ""
1004 8.7 "" 1004 8.7 "" 1004 1.5 "" 1004 6.5 ""
;
run;
... View more
- Tags:
- @Kurt_Bremser
08-15-2023
04:56 PM
data have;
input col1 col2;
datalines;
1001 1.5
1001 1.5
1001 1.5
1001 1.5
1001 1.5 1001 7 1001 8 1002 4.25
1002 4.25
1002 2.5
1002 2.5
1002 2.5 1002 2.5 1002 1.5 1003 6.5
1003 6.5
1003 1.5
1003 1.5
1003 1.5 1003 1.5 1003 1.5 1003 8.7 1004 8.7
1004 8.7
1004 8.7
1004 8.7 1004 8.7 1004 1.5 1004 6.5
;
run;
I have this above dataset, in which I need to identify and flag them if the first.COL2 value matches with the below row only. eg: for 1001, in col2 1.5 is repeated more than 2 times then we shallnot flag any observation of 1001. but for 1002, 4.25 is repeated only once( present in first and below row) , in this case both the rows should be flagged with "Y". same for 1003. for 1004 no flag will be populated as 8.7 is repeated more than 2 times.
pls guide how to go about it.
... View more
08-15-2023
02:59 PM
Thanks for responding, there are more variables involved, the intention is to flag the record from where the repetition starts in last 2 recs, so flagging the record prior to last record where repetition started is necessary.
... View more
08-15-2023
02:46 PM
Hi all,
I have a dataset as below.
data have;
input col1 col2;
datalines;
1001 1.5
1001 1
1001 1.5
1001 1.5
1001 1.5 1001 5 1001 5 1002 1.5
1002 4.25
1002 2.5
1002 2.5
1002 2.5 1002 1.5 1002 1.5 1003 6.5
1003
1003 1.5
1003 1.5 1003 5
1003 7 1003 2.1 1003 2.5 1003 2.5
;
run;
I would like to flag the first record (out of last 2 records by grouping col2 if repetitive).
eg: for 1001 even though there are 1.5 is repeated, my focus is on last 2 observations and flag the 6th observation as 6th and 7th record have same value 5. for 1002, flag the 11th observation, as 11th and 12th rec has the value 1.5.
If last 2 observations are repeated, I would like to flag the previous record to the last record by each col1 group.
... View more
08-15-2023
02:33 AM
Thank you both. @Kurt_Bremser it worked, but I realized this code is flagging every 1st occurrence if there are multiple triplicate recs present per category of COL1,
I'd really appreciate if you can help with an idea- if the triplicate repeats found in col2 first time per category of col1, then not to consider all other triplicate repeats present afterwords(and not to consider missing triplicates if coming on the way).
Sorry, I should have mentioned about this condition, apologies, should have been clearer earlier.
... View more
08-15-2023
01:42 AM
Hi all,
i have a dataset as below
data have;
input col1 col2;
datalines;
1001 1.5
1001 1
1001 2.5
1001 2.5
1001 1.5 1001 1.5 1001 1.5 1002 1.5
1002 4.25
1002 2.5
1002 2.5
1002 2.5 1002 2.5 1002 1.5 1003 6.5
1003
1003 1.5
1003 1.5
1003 2.5 1003 2.5 1003 2.5 1003
;
run;
from the above I have to filter out the rows that have repeats of values at least 3 times
for the first category(1001), I need to flag the 5th row as that row got repeated with 1.5 with out any blank/any other value even though 1.5 is present on the first row(as it's not repetitive). similarly row no 10 should be flagged for 1002 as repeats are present at least 3 times there.
any help will be appriciated.
... View more
09-29-2021
03:34 PM
Hi all,
I have 2 columns such as below.
col1 col2
xxxxx 0.5
yyyyy 1
zzzz 1
kkkk 1
llllllll 1
xxxxx 1.5
yyyyy 2
zzzz 2
kkkk 2
llllllll 2
................. similarly i have values up to 60.
My COL2 is numeric, Looking for a procedure to find out to TAG the rows containing decimal values, the order can not be changed? (with out converting the column in to character and then using any function to pick the decmial)
... View more
08-10-2021
04:25 PM
Hi users,
I've 2 columns in my data.
data a;
input var1 $20 var2 $80;
cards;
cardio xxxxxxxxxxxxxxxxxxxxx
cardio yyyyyyyyyyyyyyybbbbbbb
derma yyyyyyyyyyyyyyyyyyyyy
derma yyyyyyyyyxxxxxxxxzzzzz
derma rrrrrrrrrrrrrryyyyyyyyuuuuuu
derma yyyyyyyyyyyyyyyyyyyyyuuu
neuro jjjjjjjjjjjuuuuuuuuuuuyyyyyyyy
neuro eeeeeeeeeeeeeetttttttttttyyyyy
neuro mmmmmrrrrrrrrrrrrrrrrtttttttttttt
mental_health zzzzzzzzzzzzzzzzzzz
;
run;
I want to categorize cardio to 1 and derma to 2 and subsequently to others. so a new column must appear where for each value of cardio must have 1. how to do this
... View more