Type: Package
Title: Import 'REDATAM' Files
Version: 2.1.2
Imports: data.table, janitor, stringi, stringr, tibble
Suggests: knitr, rmarkdown, testthat (≥ 3.0.0)
Depends: R(≥ 3.5.0)
Description: Import 'REDATAM' formats into R via the 'Open REDATAM' C++ library. The full context of this project and details about the implementation are available in <doi:10.1017/dap.2025.4> (Open Access).
License: Apache License (≥ 2)
URL: https://github.com/litalbarkai/open-redatam
BugReports: https://github.com/litalbarkai/open-redatam/issues
RoxygenNote: 7.3.2
Encoding: UTF-8
NeedsCompilation: yes
VignetteBuilder: knitr
LinkingTo: cpp11
Config/testthat/edition: 3
Packaged: 2025-04-17 15:25:20 UTC; pacha
Author: Mauricio Vargas Sepulveda ORCID iD [aut, cre], Lital Barkai [aut], Ivan Krylov [ctb], Arseny Kapoulkine [ctb] ('pugixml' C++ library), Oriental Republic of Uruguay [dtc] (Aggregated census data from 2011)
Maintainer: Mauricio Vargas Sepulveda <m.sepulveda@mail.utoronto.ca>
Repository: CRAN
Date/Publication: 2025-04-17 15:40:02 UTC

redatam: Import 'REDATAM' Files

Description

Import 'REDATAM' formats into R via the 'Open REDATAM' C++ library. The full context of this project and details about the implementation are available in doi:10.1017/dap.2025.4 (Open Access).

Author(s)

Maintainer: Mauricio Vargas Sepulveda m.sepulveda@mail.utoronto.ca (ORCID)

Authors:

Other contributors:

See Also

Useful links:


Read REDATAM dictionary

Description

Read a DIC or DICX dictionary file directly into R.

Usage

read_redatam(dictionary)

Arguments

dictionary

A character string with the path to the dictionary file. It allows relative paths.

Value

A list of tibbles, each one representing a table with the census entities (or levels) and their attributes (or variables).

Examples

# Read a dictionary file (Uruguay 2011, aggregated)
zip <- system.file("extdata", "uru2011mini.zip", package = "redatam")
dout <- paste(tempdir(), "uru2011mini", sep = "/")
unzip(zip, exdir = dout)
read_redatam(paste(dout, "uru2011mini.dic", sep = "/"))
# or equivalently
read_redatam(paste(dout, "uru2011mini.dicx", sep = "/"))