knitr::opts_chunk$set( collapse = TRUE )
library(ILSAmerge)
Using ILSAfile.info()
we can identify different populations within an ILSA.
Moreover, we can also use this information for loading an specific population into the memory. Using the 'REDS' 2021 example data provided by this package:
ILSAfile.info(inputdir = system.file("extdata/reds", package = "ILSAmerge"))
We can decide to load a population, like BCGV1
, using justload()
:
loaded <- justload(inputdir = system.file("extdata/reds", package = "ILSAmerge"), population = "BCGV1")
This will result in a list of elements loaded by haven
, in our example, a list
of 11 elements:
class(loaded) length(loaded) loaded[[1]]
For some purposes, we might need to load only the column information, most
probably to check if the attributes are correct. We can do this by setting
justattributes = TRUE
:
loaded <- justload(inputdir = system.file("extdata/reds", package = "ILSAmerge"), population = "BCGV1", justattributes = TRUE)
This will load all 11 datasets with 0 rows each:
length(loaded)
loaded[[1]]
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.