I think you approach is a little bit off right now. Doing sample(nrow(dataframe),60)
won't give you the desired effect because nrow
returns ONE number (not a vector). So you want to do sample(1:nrow(dataframe),60.....
instead.
I don't know of a better approach than using a simple for
loop if you're sampling indices:
List <- list()
lenght(List) <- 100 ## Growing a list inside a loop is inefficient
for(i in 1:100) {
DataNew <- Data[sample(1:nrow(Data),60,replace=T),]
Model <- glm(DataNew....)
List[i] <- Model
}