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.

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

nhgis_file <- ipums_example("nhgis0008_csv.zip")
ipums_list_files(nhgis_file) # Only one extract available
#> # A tibble: 1 × 2
#>   type  file                                       
#>   <chr> <chr>                                      
#> 1 data  nhgis0008_csv/nhgis0008_ds135_1990_pmsa.csv