I have the following sample data frame:
DATA queries;
INPUT id :$12. type :$3000. count :3.;
INFILE DATALINES DSD;
DATALINES;
1, Theft, 3
2, Assault, 3
3, Murder, 1
4, Fraud, 1
;
RUN;
But I'd rather have each row repeated n times (according to the value of the count
-variable). So the result should be:
id type count
1 Theft 3
1 Theft 3 <- new
1 Theft 3 <- new
2 Assault 3
2 Assault 3 <- new
2 Assault 3 <- new
3 Murder 1
4 Fraud 1
Does anyone know how to multiply the rows in SAS?
WEIGHT <var>
andFREQ <var>
statements to deal with weighted and presummarized (count) data. – Richard