Answers for "how to convert a row of a dataframe into a vector 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 a row of a dataframe into a vector r"

Browse Popular Code Answers by Language