Object-Oriented Programming with S3 and R6 in R
Richie Cotton
Data Evangelist at DataCamp
exp
function (x) .Primitive("exp")
+
function (e1, e2) .Primitive("+")
if
.Primitive("if")
sin
function (x) .Primitive("sin")
-
function (e1, e2) .Primitive("-")
for
.Primitive("for")
.S3PrimitiveGenerics
"anyNA" "as.character" "as.complex"
"as.double" "as.environment" "as.integer"
"as.logical" "as.call" "as.numeric"
"as.raw" "c" "dim"
"dim<-" "dimnames" "dimnames<-"
"is.array" "is.finite" "is.infinite"
"is.matrix" "is.na" "is.nan"
"is.numeric" "length" "length<-"
"levels<-" "names" "names<-"
"rep" "seq.int" "xtfrm"
all_of_time <- c("1970-01-01", "2012-12-21")
as.Date(all_of_time)
"1970-01-01" "2012-12-21"
class(all_of_time) <- "date_strings"
as.Date(all_of_time)
Error in as.Date.default(all_of_time) :
do not know how to convert 'all_of_time' to class"Date"
length(all_of_time)
2
.S3PrimitiveGenerics
lists primitive S3 genericsObject-Oriented Programming with S3 and R6 in R