0

My workspace (aka global environment) contains the data frame mtcars that consists of three variables: mpg, cyl and disp (in that order). Which command return the variable cyl as atomic vector?

Nasim Rony
  • 519
  • 5
  • 22

1 Answers1

0

Or with dyplr:

library(dyplr)
mtcars %>% pull(cyl)

This can be handy if you want to add further operations to the extracted vector.

Cian
  • 58
  • 7