Learn R Programming

bandicoot (version 1.0.0)

BASE$set_attr: Set value of an attribute or a method

Description

This function sets the value of an attribute or a method.

Usage

BASE$set_attr(attr_name, attr_val)

Value

Return the object itself.

Arguments

attr_name

Character. Attribute name.

attr_val

Any value.

Examples

Run this code

test <- BASE$instantiate()
test$set_attr("x", 1)
test$x

Run the code above in your browser using DataLab