Acts just like 'pull()' from 'dplyr' except that it only returns the unique values.
u_pull(data, var = -1, sorted = FALSE, na.rm = FALSE)
data | a table of data |
---|---|
var | A variable specified as:
The default returns the last column (on the assumption that's the column you've created most recently). This argument is taken by expression and supports quasiquotation (you can unquote column names and column positions). |
sorted | (boolean) sort the output; default |
na.rm | (boolean) remove |
suppressPackageStartupMessages(library(dplyr)) tibble::tibble(a = c(1:3, 1:3), b = LETTERS[1:6]) %>% u_pull(a)#> [1] 1 2 3