BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hello,
The data is like this:
Group Score
1 5
1 9
1 6
2 3
2 7
2 8

I guess using do statement(or similar loop) in the data step would speed the input. I know for example in matlab how to do this, but what is the equivalent code in SAS?
gim
2 REPLIES 2
deleted_user
Not applicable
Hi,
I got a solution of my own:
data test;
do group=1 to 2;
do j=1 to 3;
input score @;
output;
end;
end;
drop j;
datalines;
5 9 6 3 7 8
;

gim
deleted_user
Not applicable
... and why do you think that this is better?

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 651 views
  • 0 likes
  • 1 in conversation