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.
Seemingly Similar Threads
- Looping an lapply linear regression function
- Following progress in a lapply() function
- multiple plots and looping assistance requested (single plot)
- Is there an variant of apply() that does not return anything?
- applying duplicated, unique and match to lists?