powered by
This is a direct replacement for [[.data.frame.
[[.data.frame
pull(.data, var = -1)
A data.frame.
data.frame
A variable specified as:
a literal variable name
a positive integer, giving the position counting from the left
a negative integer, giving the position counting from the right
The default returns the last column (on the assumption that's the column you've created most recently).
mtcars %>% pull(-1) mtcars %>% pull(1) mtcars %>% pull(cyl) mtcars %>% pull("cyl")
Run the code above in your browser using DataLab