Search notes:

R function: class

class returns the values of the class attribute of an R object.
class(NA)
# [1] "logical"

class(as.Date('2015-03-12'))
# [1] "Date"

class("foo")
# [1] "character"

class(letters[1:5])
# [1] "character"

class(data.frame(c1=1:2, c2=letters[1:2]))
# [1] "data.frame"

class(noquote("foo"))
# [1] "noquote"

class( typeof )
# [1] "function"

class( function(x) { x*x} )
# [1] "function"

x<-1:5
y<-x^2
class( x~y )
# [1] "formula"
Github repository about-r, path: /functions/class.R

See also

R: class
Exploring R objects
typeof(…), mode(…)
unclass
Index to (some) R functions

Index