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

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -