dot-modClass: Add or remove a class name from an object

.modClassR Documentation

Add or remove a class name from an object

Description

Add or remove a class name from an object

Usage

.addClass(x) <- value

.removeClass(x) <- value

Arguments

x

an R object.

value

character vector of lenght 1.

Value

an R object.

Note

Internal function only for convenience

Examples

x = list(a="foo", b="bar")
class(x)
# [1] "list"
## Not run: 
.addClass(x) <- "blubb"
class(x)
# [1] "blubb" "list" 

.addClass(x) <- "blubb"
class(x)
# [1] "blubb" "list" 

.removeClass(x) <- "blubb"
class(x)
# [1] "list"

## End(Not run)

frankkramer-lab/RCX documentation built on Feb. 4, 2023, 5:12 p.m.