How to limit number of transposed variables in proc transpose SAS -
i transposing file several million observations using
proc transpose data=click out=click_transp name=test prefix=var; comlogid; var clickthrulink_description; run; however, job takes long time run because of clickthrulink_description have hundreds of observations. need limit transposed variable down 6. there way in sas , more efficient in terms of run time?
you have few options.
first off, use keep statement in output.
proc transpose in=have out=want(keep=id col1-col6); id; var myvar; run; this limit what's written output dataset, limit size greatly.
you use options compress=yes; bigger issue - lots of blank data. decrease amount of size needed store observations fewer maximum number of columns.
finally, limit things view:
data v_have/view=v_have; set have; id; if first.id counter=0; counter+1; if counter<6; run; proc transpose data=v_have out=want; id; var yourvar; run; that pass first 6 observations per id transpose procedure.
Comments
Post a Comment