How to extract a variable from a data frame or tibble with the pull function of the dplyr package in the R programming language. More Details: https://statisticsglobe.com/r-pull-function-dplyr-package
R code of this video:
##### Example data
data <- data.frame(x1 = 1:5, # Create example data
x2 = LETTERS[1:5])
data # Print example data
##### Install & load dplyr
install.packages("dplyr") # Install dplyr
library("dplyr") # Load dplyr
##### Example 1
pull(data, x1) # Apply pull function
##### Example 2
pull(data, 1) # pull function with index
Download
0 formats
No download links available.
pull R Function of dplyr Package (2 Examples) | Extract Column / Variable from Data Frame / Tibble | NatokHD