Hello
i want to create an ampty data.frame that i will then fill with a rbind in a "for" loop
tirage <- function(N){#on tire N echantillons de tirages de n cartes
#on retourne le data.frame de N lignes et n colonnes
laliste=data.frame("","","")
laliste <- laliste[-1,]
for (i in 1:N){
laliste <- rbind(laliste,sample(carte, size =n, replace=F))
}
return(laliste)
}
the little problem is : i find my instruction
laliste=data.frame("","","")
laliste <- laliste[-1,]
a bit weird
is there not a more natural way to create an empty data.frame ?