Learn R Programming

tidytable (version 0.5.1)

pull.: Pull out a single variable

Description

Pull a single variable from a data.table as a vector.

Usage

pull.(.df, var = NULL)

dt_pull(.df, var = NULL)

Arguments

.df

A data.frame or data.table

var

The column to pull from the data.table. If NULL, pulls the last column.

Examples

Run this code
# NOT RUN {
test_df <- data.table(
  x = c(1,2,3),
  y = c(4,5,6))

test_df %>%
  pull.(y)
# }

Run the code above in your browser using DataLab