Consider the factor f1 generated by the following code.
v1 <- sample(1:3, 10, TRUE)
f1 <- factor(v1, levels = 1:3, labels = 3:1)What will the expression levels(f1) return?
- Correct
- Wrong: This vector is ordered incorrectly.
- Wrong: Factor level names are always character values.
- Wrong: Factor level names are always character values (these numbers are also ordered incorrectly).
- Wrong: This is the number of levels, nlevels(f1).
- Wrong: f1has ten elements, but it has only three levels.
- Wrong: f1has ten elements, but it has only three levels.
- Wrong: f1has ten elements, but it has only three levels.