Displaying 1 result from an estimated 1 matches for "single_simul".
2009 Jul 27
2
How should i change the SAS Codes into R Codes?
Dear R users,
I have a SAS codes with several loops in it, and i hope to use R to do the
same task. The SAS codes are as follows,
/*to generate the dataset*/
DATA Single_Simulation;
DO se=0 to 1 by 0.01;
DO sp=0 to 1 by 0.01;
DO DR=0 to 1 by 0.01;
TR=(DR+sp-1)/(se+sp-1+1.0e-12);
Adjust_Factor=TR/(DR+1.0e-12);
OUTPUT;
END;
END;
END;
RUN;
/*to select some data*/
DATA sampledata;
SET Single_Simulation;
IF DR=0.02 & sp=1;
RUN;
#I tried the fol...