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

Description Usage Arguments Value Note Examples

Description

Add or remove a class name from an object

Usage

1
2
3
.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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
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 July 14, 2021, 6:33 p.m.