[Stable]

Read sas data, clean and remove labels and formats

read_sasdata(
  path,
  filename,
  years,
  checkdups = FALSE,
  id,
  clean = TRUE,
  removeformats = TRUE,
  removelabels = TRUE
)

Arguments

path

The path to the dataset.

filename

The filename (without extension).

years

Optional. If dataset from different yeas (for example from LISA) bind together.

checkdups

Should check for duplicates? Default is FALSE.

id

If duplicates should be checked, identifier that should be unique. Should be character ("LopNr")

clean

Should the dataset be cleaned from spaces and special characters in character columns? Default is TRUE.

removeformats

Should sas formats be removed? Default is TRUE.

removelabels

Should sas labels be removed? Default is TRUE.

Value

A dataset.

Examples

if (FALSE) {
antalbarn <- read_sasdata(path = scbpath, filename = "lb_lev_antal_barn", years = 1999:2018, clean = FALSE, checkdups = TRUE, id = "LopNr")
}