Skip to main content

Section 5.8 Test Yourself

Checkpoint 5.8.1.

In a typical rectangular dataset, what is the top row containing the variable names, such as NAME, AGE, and GENDER, technically called?
  • A case or instance
  • No, a case or instance refers to an entire row of data for a single thing, like "Dad" or "Mom".
  • A key
  • No, a key is a column of unique numbers or labels used to identify each individual case or row.
  • Metadata
  • Correct! The text describes the variable names as "meta data," or data about data.
  • A factor
  • No, in R, a factor is a special data type used for categorical variables like "Male" and "Female".

Checkpoint 5.8.2.

According to the text, what is a "Factor" in R?
  • The result of using the `c()` function to combine numbers.
  • No, that creates a numeric vector.
  • A special labeling system with "levels" used to organize groups of cases.
  • Right! The text explains that a Factor is used for labels like "Male" and "Female" and has "levels" representing the different groups.
  • Another name for a variable or an attribute.
  • No, a Factor is a specific *type* of variable, not just another name for one.
  • A data frame that contains only character data.
  • No, a Factor is a type of vector (column) within a data frame, not the data frame itself.
Chapter Challenge:
Create another variable containing information about family members (for example, each family member’s estimated IQ; you can make up the data). Take that new variable and put it in the existing myFam dataframe. Rerun the summary() function on myFam to get descriptive information on your new variable.
You have attempted of activities on this page.