Category labels and underlying storage

An analyst represents subscription tiers in two ways using the following base R code. Complete the diagnostic table for both objects. Enter type and class names without quotation marks, and logical results as TRUE or FALSE.


R
tier <- factor(c("basic", "plus", "basic"),
               levels = c("basic", "plus"))
labels <- c("basic", "plus", "basic")


Each column gives the function to apply to the object named in that row.

Objecttypeofclassis.integeris.character
tier
labels

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More R Data Types Questions: