Description Usage Arguments Details Value Author(s) Examples
Extracts and combines variables from selected HILDA waves
1 | read_hilda(domain, waves = NULL, dir = NULL, filenames = NULL, release = 18)
|
domain |
The domain you want to extract. |
waves |
The wave(s) you want the domain variables to come from. Can be left empty if using custom file names. |
dir |
Directory where the STATA files are located. Default is the current working directory. |
filenames |
Vector of .dta files to be read. Default is names used by the Australian Data Archive. |
release |
Release number of the wave to be read. Defaults to 18. (newest wave) |
The read_hilda function reads, extracts and combines variables from individual waves (a wave refers to each separate survey in a series of related surveys) of the panel dataset
'The Household, Income and Labour Dynamics in Australia' (HILDA), into an R data.frame.
If you are using many waves read_hilda can take a while to run, go grab a cup of coffee! Don't forget to save the resulting data.frame so you don't have to do it again.
The identifier xwaveid is included by default. An indicator wave is created, keeping track of from which wave a variable originates (denoted by wave prefixes a:q for waves 1:17).
The function reads from the HILDA .dta (STATA) files.
A data.frame with the chosen domain variables, xwaveid and wave indicator.
Sara Kalucza & Sebastian Kalucza
1 2 3 4 5 | path <- system.file("extdata", package = "hildareadR")
# Reads variable hibiff and hgage from waves 1 to 3 in directory fdir and from release 17
read_hilda(c("hibiff", "hgage"), waves = 1:3, dir = path, release = 17)
# Reads variable aiopeye from custom files in directory fdir and from release 17
read_hilda("aiopeye", dir = path, filenames = c("custom1.dta", "custom2.dta"), release = 17)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.