Tsallaka zuwa abun ciki
Justice Tech School

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 <- 5

Quiz Test

What does TRUE have as a class?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.