Answers for "how to convert dataframe to array in r"

R
1

convert dataframe row to vector r

# if you wish to keep the names:
unlist(df[1,])
  a   b   c 
1.0 2.0 2.6 

is.vector(unlist(df[1,]))
[1] TRUE
Posted by: Guest on April-20-2021

Code answers related to "how to convert dataframe to array in r"

Browse Popular Code Answers by Language