Dear,
I need to insert two blank rows in my data set to use it for a graph. I am getting the output i need from data two, but is there a better way to program as there are more variables in actual data set. Thank you
output needed
a 1 c a
a
b 2 c a
c 3 c a
d 4 c a
e 5 c a
g 6 c a
data one;
input a $ b c $ d $;
datalines;
a 1 c a
b 2 c a
c 3 c a
d 4 c a
e 5 c a
g 6 c a
;
data two;
set one;
if _n_=1 then output;
if _n_=1 then do;b=.;c='';d='';output;end;
if _n_=1 then do;a='';b=.;c='';d='';output;end;
else output;
run;
data two1;
set one;
if _n_=1 then do;
output;
call missing(b,c,d);
output;
call missing(of _all_);
output;
end;
else output;
run;
What kind of graph requires a blank row?
@PeterClemmensen wrote:
What kind of graph requires a blank row?
I am guessing one that the data is coming from a spreadsheet and is structured poorly for SAS graphing and this an attempt to translate spreadsheet graphing practices to a SAS graphic procedure.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.