Exercise

Any changes?

Consider the code below that loads data from 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 (view) file is available in your current working directory so you can experiment in the console.

Instructions

50 XP

Possible answers