0

I want to store the values of a column of a data.frame after removing the name in a vector. I tried the following code, but it did not work. It shows me that the type of 'my_vector' is data.frame. I would like to know why the type is data.frame and how to do it. Here is my code:

my_vector <- as.vector(unname(my_data.frame[column]))
Jd_mahmud
  • 41
  • 6

1 Answers1

0

The typical way to do this in R is my_vector <- my_data.frame[[column]]

smingerson
  • 1,368
  • 9
  • 12