Hi,

Suppose I've a dataframe of 10 variables (X1-X10) and have 1000 rows. Now I 
want to randomly select rows so that I've a subset of the dataset.


Can anyone please help me to solve this problem?


I tried the following code:


randSample = sample(nrow(dataframe), 200);


This gives me a column matrix with position of the row randomly selected. But I 
could not able to solve how from this matrix I can subset data from original 
dataframe.


Thank you!


Arijit

Reply via email to