pull1: Pull out a single element from a (list-) variable

View source: R/fns.R

pull1R Documentation

Pull out a single element from a (list-) variable

Description

dplyr::pull is a convenient way to pull out the values of a column from a data frame, but if you've got a long list column and just want to check one to make sure everything's working, printing the whole list can clutter up the console. pull1 just pulls out one.

Usage

pull1(.data, my_var, one_to_pull = 1)

Arguments

.data

a data frame

my_var

the unquoted name of the variable you want to pull out an element from

one_to_pull

if you don't want to pull the first element, set this to the row number of the one you want

Value

The one_to_pull-th element of the input variable


andrewGhazi/geryon documentation built on April 14, 2025, 3:51 p.m.