Learn R Programming

ipumsr (version 0.5.2)

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)

Value

A tbl_df data.frame containing the files available

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

Examples

Run this code
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