The first line creates a sequence variable. The second like selects the first 30 observations.
smalldata$suji <- 1:nrow(smalldata)
smalldata<-filter(smalldata,suji <= 30)
In SAS's datastep, this would be:
suji=_n_;
if suji <=30;
The first line creates a sequence variable. The second like selects the first 30 observations.
smalldata$suji <- 1:nrow(smalldata)
smalldata<-filter(smalldata,suji <= 30)
In SAS's datastep, this would be:
suji=_n_;
if suji <=30;