Is it possible to pull more than one column when using the pull command in R? How? When I try adding a second column (X2), R thinks I'm adding a new argument. See below.
data %>% pull(., X1, X2)
Is it possible to pull more than one column when using the pull command in R? How? When I try adding a second column (X2), R thinks I'm adding a new argument. See below.
data %>% pull(., X1, X2)
Pull outputs vectors, use select()
to keep working with data.frame
:
data %>% select(X1, X2)
Or in base R syntax:
data[c("X1", "X2")]