powered by
Utilities for handling with classes
add_class(x, class)has_class(x, class)remove_class(x, class)set_class(x, class)
has_class(x, class)
remove_class(x, class)
set_class(x, class)
The object x with the class added or removed.
x
An object
The class to add or remove
Tiago Olivoto tiagoolivoto@gmail.com
add_class(): add a class to the object x keeping all the other class(es).
add_class()
has_class(): Check if a class exists in object x and returns a logical value.
has_class()
set_class(): set a class to the object x.
set_class()
remove_class(): remove a class from the object x.
remove_class()
# \donttest{ library(metan) df <- data_ge2 %>% add_class("my_class") class(df) has_class(df, "my_class") remove_class(df, "my_class") %>% class() set_class(df, "data_frame") %>% class() # }
Run the code above in your browser using DataLab