Learn R Programming

ipumsr (version 0.4.5)

ipums_list_files: List files available for analysis in an IPUMS extract

Description

Find which files can be loaded from an IPUMS extract. On Windows, this is generally a zip file (which you can optionally unzip). On macOS, they are generally unzipped for you, so there will be a directory.

Usage

ipums_list_files(
  file,
  types = NULL,
  data_layer = NULL,
  shape_layer = NULL,
  raster_layer = NULL
)

ipums_list_data(file, data_layer = NULL)

ipums_list_shape(file, shape_layer = NULL)

ipums_list_raster(file, raster_layer = NULL)

Arguments

file

An IPUMS extract zip file or directory

types

One or more of "data", "shape", or "raster" indicating what type of files to look for.

data_layer

dplyr select-style notation for the data files to look for

shape_layer

dplyr select-style notation for the shape files to look for

raster_layer

dplyr select-style notation for the raster files to look for

Value

A tbl_df data.frame containing the files available

Examples

Run this code
# NOT RUN {
nhgis_file <- ipums_example("nhgis0008_csv.zip")
ipums_list_files(nhgis_file) # Only one extract available

# }

Run the code above in your browser using DataLab