Skip to contents

Returns the first element of what class(x) returns

Usage

mainClass(x)

Arguments

x

any R object

Value

name of main class of x (vector of character of length one)

Examples

class(as.POSIXct("2022-06-02"))
#> [1] "POSIXct" "POSIXt" 
mainClass(as.POSIXct("2022-06-02"))
#> [1] "POSIXct"