1. Learn
  2. /
  3. Courses
  4. /
  5. Importing Data in R (Part 1)

Connected

Exercise

Any changes?

Consider the code below that loads data in swimming_pools.csv in two distinct ways:

# Option A
pools <- read.csv("swimming_pools.csv", stringsAsFactors = TRUE)

# Option B
pools <- read.csv("swimming_pools.csv", stringsAsFactors = FALSE)

How many variables in the resulting pools data frame have different types if you specify the stringsAsFactors argument differently?

The swimming_pools.csv file is available in your current working directory so you can experiment in the console.

Instructions

50 XP

Possible answers