ipums_view {ipumsr} | R Documentation |
View a static webpage with variable metadata from an IPUMS extract
Description
For a given ipums_ddi
object or data frame, display metadata about
its contents in the RStudio viewer pane. This includes extract-level
information as well as metadata for the variables included in the
input object.
It is also possible to save the output to an external HTML file without launching the RStudio viewer.
Usage
ipums_view(x, out_file = NULL, launch = TRUE)
Arguments
x |
An Note that file-level information (e.g. extract notes) is only
available when |
out_file |
Optional location to save the output HTML file. If |
launch |
Logical indicating whether to launch the HTML file in the
RStudio viewer pane. If |
Details
ipums_view()
requires that the htmltools, shiny, and DT packages are
installed. If launch = TRUE
, RStudio and the rstudioapi package must
also be available.
Note that if launch = FALSE
and out_file
is unspecified, the output
file will be written to a temporary directory. Some operating systems
may be unable to open the HTML file from the temporary directory; we
suggest that you manually specify the out_file
location in this case.
Value
The file path to the output HTML file (invisibly, if launch = TRUE
)
Examples
ddi <- read_ipums_ddi(ipums_example("cps_00157.xml"))
## Not run:
ipums_view(ddi)
ipums_view(ddi, "codebook.html", launch = FALSE)
## End(Not run)