Object-Oriented Programming with S3 and R6 in R
Richie Cotton
Data Evangelist at DataCamp
summary(c(TRUE, FALSE, NA, TRUE))
Mode FALSE TRUE NA's
logical 1 2 1
summary(rgamma(1000, 1))
Min. 1st Qu. Median Mean 3rd Qu. Max.
0.000354 0.276500 0.690300 1.020000 1.384000 9.664000
print
function (x, ...)
UseMethod("print")
<bytecode: 0x1062f0870>
<environment: namespace:base>
print.Date
summary.factor
unique.array
args(print)
function (x, ...)
NULL
args(print.Date)
function (x, max = NULL, ...)
NULL
...
print.function
function (x, useSource = TRUE, ...)
.Internal(print.function(x, useSource, ...))
print.Date
function (x, max = NULL, ...)
{
if (is.null(max))
max <- getOption("max.print", 9999L)
if (max < length(x)) {
print(format(x[seq_len(max)]), max = max, ...)
cat(" [ reached getOption(\"max.print\") -- omitted",
length(x) - max, "entries ]\n")
}
else print(format(x), max = max, ...)
invisible(x)
}
generic.class
...
arglower_snake_case
or lowerCamelCase
Object-Oriented Programming with S3 and R6 in R