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.

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

Vilmantas Gegzna

Examples


# [NO EXAMPLES YET]