Learn R Programming

BBmisc (version 1.13)

setAttribute: A wrapper for attr(x, which) = y.

Description

A wrapper for attr(x, which) = y.

Usage

setAttribute(x, which, value)

Value

Changed object x.

Arguments

x

[any]
Your object.

which

[character(1)]
Name of the attribute to set

value

[ANY]
Value for the attribute.

Examples

Run this code
setAttribute(list(), "foo", 1)

Run the code above in your browser using DataLab