How to split the vector into small group in R? -
X < -rnorm (5000,5,3) How can I split x into 500 groups, there are ten numbers in each group?
Answer # 1: / P>
x < -rnorm (5000,5,3) y & lt; -matrix (nr = 500, nc = 10) y [] and lt; -x
y
Comments
Post a Comment