added_as: [!!!] Set or get attribute 'added_as'

View source: R/added_as.R

added_asR Documentation

[!!!] Set or get attribute 'added_as'

Description

Function either returns value of 'attributes(obj)$added_as' (if TYPE is not provided) OR returns updated 'obj' with addedd attribute if both conditions are fulfilled: 'TYPE' is provided and attribute is 'NULL'. otherwise returns 'obj' intact.

Usage

added_as(obj, TYPE = NULL, force.TYPE = FALSE)

Arguments

obj

An object to be updated

TYPE

string to be added as attribute $added_as if $added_as is not already present.

force.TYPE

Logical. If TRUE, value of attribute $added_as is added or replaced even if obj already has it.

Details

If force.TYPE == TRUE, new value of 'TYPE' will be added any way.

Author(s)

Vilmantas Gegzna

Examples


# [NO EXAMPLES YET]


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