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.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and save with the early bird rate—just $795!
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.