Hello,
I would like to insert additional numbers between the values in my sample dataset with a 1-unit interval. Please help, thanks.
data HAVE;
Format Weekcode 4.0 Test 3.0 Pos 3.0 Lab 4.0;
infile datalines delimiter='/';
input Weekcode Test Pos Lab;
datalines;
2102/ 8/ 3/ 256/
2103/ 3/ 1/ 619/
2106/ 5/ 2/ 2066/
2107/ 3/ 0/ 256/
2110/ 7/ 6/ 619/
;
data WANT;
Format Weekcode 4.0 Test 3.0 Pos 3.0 Lab 4.0;
infile datalines delimiter='/';
input Weekcode Test Pos Lab;
datalines;
2101/ 0/ 0/ 0/
2102/ 8/ 3/ 256/
2103/ 3/ 1/ 619/
2104/ 0/ 0/ 0/
2105/ 0/ 0/ 0/
2106/ 5/ 2/ 2066/
2107/ 3/ 0/ 256/
2108/ 0/ 0/ 0/
2109/ 0/ 0/ 0/
2110/ 7/ 6/ 619/
2111/ 0/ 0/ 0/
2112/ 0/ 0/ 0/
2113/ 0/ 0/ 0/
2114/ 0/ 0/ 0/
2115/ 0/ 0/ 0/
;
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.