attach_obj: Attach an object to the end of a list

View source: R/attach_obj.R

attach_objR Documentation

Attach an object to the end of a list

Description

Attach an object to the end of a list

Usage

attach_obj(x = list(), obj)

Arguments

x

A list.

obj

An object to be attached as the last element of the list x.

Value

The list x with obj attached as its last and unnamed element.

Examples


l <- list(a = 1, b = 2)
attach_obj(l, obj = 3)
 #> $a
 #> [1] 1
 #>
 #> $b
 #> [1] 2
 #>
 #> [[3]]
 #> [1] 3



GegznaV/knitrContainer documentation built on April 16, 2023, 1:38 p.m.