aliases: Extract or replace parts of an object

pull_outR Documentation

Extract or replace parts of an object

Description

pull_out() is similar to [. It acts on vectors, matrices, arrays and lists to extract or replace parts. It is pleasant to use with the magrittr (⁠%>%⁠) and base (⁠|>⁠) operators.

Value

pull_out() will return an object of the same class as the input object.

Examples


good_choice <- letters %>%
  pull_out(c(5, 2, 1, 4))

good_choice

iris %>%
  pull_out(, 1:4) %>%
  head()


bulkreadr documentation built on May 29, 2024, 1:35 a.m.