Skip to contents

read_insee_serie() reads INSEE series data from a csv2 file, typically downloaded from the INSEE BDM database. It handles data.frames with a specific format (skip first 3 lines).

Usage

read_insee_serie(x, name = NULL, as_list = TRUE)

Arguments

x

character, file(s) path(s) to the INSEE series data.

name

character, names for the result.

as_list

logical, if x is of length 1, should the result be a list

Value

A list of data.frames with one column named "value" containing the series data. If length of x is 1, and as_list is FALSE, a data.frame.

Examples

if (FALSE) { # \dontrun{
# Read a single file
x = download_insee_index("010538819", verbose = TRUE)
index = read_insee_serie(x)
index = read_insee_serie(x, name = "my_serie")

# Read multiple files
x = download_insee_index(c("010538819", "010776418"), verbose = TRUE)
index = read_insee_serie(x)
index = read_insee_serie(x, name = c("serie_a", "serie_b"))
} # }