mlr3misc (version 0.1.0)

set_class: Set the Class

Description

Simple wrapper for class(x) = classes.

Usage

set_class(x, classes)

Arguments

x

:: any.

classes

:: character(1) Vector of new class names.

Value

Object x, with updated class attribute.

Examples

# NOT RUN {
set_class(list(), c("foo1", "foo2"))
# }