Basic Types
numeric, integer, character, logical, complex and NULL. class() and typeof() tell the type.
Example
x <- 3.5
n <- 5L
s <- "text"
b <- TRUE
print(class(x)); print(class(n)); print(class(s)); print(class(b))
print(is.numeric(x))Exercise
Integer literal.
n <- 5Quiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.