I have this simulation of 1000 random numbers:
a <-sample(0:1, 1000, rep = TRUE)
What I want is a data frame of ten columns, where the values of each column are generated like a.
For example:
id Column 1 Column2 .........Column 10
1 1 1
2 0 1
3 1
0
0
.
.
1000 1 1
See Question&Answers more detail:os