Hi,The conditions are not very clear.
set.seed(285)
 RN <- sample(1:100,20,replace=FALSE)
aList <- lapply(1:10,function(i) sample(RN,i,replace=FALSE)) 
 sapply(aList,tail,1)
# [1] 87 60 96 87 60 67 42 96 73 24

A.K.




I was wondering if I could obtain some help on how to do this. 



I feel as if I'm supposed to use the vector that i made with sample in order to 
use this function 

I've been trying 

aList <- lapply(1:10, RN) of course it doesn't work.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to