Variable types of vectors are deducted
-
We'll learn a lot more about vectors later
-
TODO: Mixed data?
y = c(2, 7, 3)
class(y) # numeric
the_truth = c(TRUE, FALSE, TRUE, TRUE, FALSE)
class(the_truth) # logical
length(the_truth) # 5
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help
We'll learn a lot more about vectors later
TODO: Mixed data?
y = c(2, 7, 3)
class(y) # numeric
the_truth = c(TRUE, FALSE, TRUE, TRUE, FALSE)
class(the_truth) # logical
length(the_truth) # 5