if (FALSE) {
# Read an ODS file
read_ods("starwars.ods")
# Read a specific sheet, e.g. the 2nd sheet
read_ods("starwars.ods", sheet = 2)
# Read a specific range, e.g. A1:C11
read_ods("starwars.ods", sheet = 2, range = "A1:C11")
# Read an FODS file
read_ods("starwars.fods")
# Read a specific sheet, e.g. the 2nd sheet
read_ods("starwars.fods", sheet = 2)
# Read a specific range, e.g. A1:C11
read_ods("starwars.fods", sheet = 2, range = "A1:C11")
# Give a warning and read from Sheet1 (not 2)
read_ods("starwars.fods", sheet = 2, range = "Sheet1!A1:C11")
# Specifying col_types as shorthand, the third column as factor; other by guessing
read_ods("starwars.ods", col_types = "??f")
# Specifying col_types as list
read_ods("starwars.ods", col_types = list(species = "f"))
# Using read_fods, although you don't have to
read_ods("starwars.fods")
}
Run the code above in your browser using DataLab