I am trying to create a bootstrap for the data frame 'ev_all_clean'
set.seed(1315)
boot_s <- as.data.frame(matrix(NA, ncol = 19, nrow = 1000))
for(k in 1:19){
for(l in 1:1000){
boot_s[l,k]<- sample(ev_all_clean[,k], size=1, replace=T)
}
}
The above code returns
replacement element 1 has 768 rows to replace 1 rows
Help is much appreciated! Thank you in advance.