Answers for "r convert matrix to vector by column"

R
1

r convert matrix to list of column vectors

# Basic syntax:
 split(your_matrix, rep(1:ncol(your_matrix), each = nrow(your_matrix)))
Posted by: Guest on October-10-2020
0

convert a matrix to a vector in r

as.vector(my_mat)                    # Applying as.vector function
Posted by: Guest on August-23-2021

Browse Popular Code Answers by Language