v1 <- c(__________)
f2 <- f_____(__________)
l3 <- l_____(__________)
m4 <- m_____(__________)
d5 <- d_____.f_____(__________)
v <- c(type = typeof(v1), class = class(v1))
f <- c(type = __________, class = _________)
l <- c(type = __________, class = _________)
m <- c(type = __________, class = _________)
d <- c(type = __________, class = _________)
____(vec = v,
______ = ___,
______ = ___,
______ = ___,
______ = ___)Lab 05: R Data Type Summary
Note
In lab.qmd Lab 5,
Create R objects vector
v1, factorf2, listl3, matrixm4and data framed5.Check
typeof()andclass()of those objects, and create a list having the output below.
$vec
type class
"double" "numeric"
$fac
type class
"integer" "factor"
$lst
type class
"list" "list"
$mat
type class1 class2
"integer" "matrix" "array"
$df
type class
"list" "data.frame"