powered by
Pull a single variable from a data.table as a vector.
pull.(.df, var = -1)
A data.frame or data.table
The column to pull from the data.table as:
a variable name
a positive integer giving the column position
a negative integer giving the column position counting from the right
# NOT RUN { test_df <- data.table( x = c(1,2,3), y = c(4,5,6)) test_df %>% pull.(y) test_df %>% pull.(1) test_df %>% pull.(-1) # }
Run the code above in your browser using DataLab