Learn R Programming

mlr3misc (version 0.15.1)

set_class: Set the Class

Description

Simple wrapper for class(x) = classes.

Usage

set_class(x, classes)

Value

Object x, with updated class attribute.

Arguments

x

(any).

classes

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

Examples

Run this code
set_class(list(), c("foo1", "foo2"))

Run the code above in your browser using DataLab