append_to_list: Append an item to a list dynamically

View source: R/append_to_list.R

append_to_listR Documentation

Append an item to a list dynamically

Description

The append_to_list() function appends an object to the specified list in Global Environment (default). This function is pipe-optimised, and allows the option of specifying a name for the new object in the list.

Usage

append_to_list(x, list_x, name = "", enviro = .GlobalEnv)

Arguments

x

An object to append to list, e.g. vector, data frame.

list_x

Target list to append object to.

name

Specify a character string for the name of the list. Defaults to blank

enviro

Specifies the environment

Examples

a_list <- list(NULL)
append_to_list(iris,a_list,"iris") 


martinctc/surveytools documentation built on Nov. 21, 2024, 10:48 p.m.