> df <- data.frame(matrix(ncol = 300, nrow = 100))
> dim(df)
[1] 100 300
I always just convert a matrix:
x <- as.data.frame(matrix(nrow = 100, ncol = 10))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With