archdatapy

archdatapy.archdata.get_archdata(save_location=None, data_url=None)[source]

Downloads and extracts datasets from the R archdata package.

Parameters:
  • save_location (str) – Optional. Path to save extracted files. If None, uses a temporary directory.

  • data_url (str) – Optional. URL for the archdata package source. Defaults to CRAN URL.

Returns:

A dictionary with extension-stripped file names as keys and full paths to the .rda files as values.

Return type:

dict

archdatapy.archdata.load_archdata(file_path)[source]

Loads an .rda file and returns the contents using pyreadr.

Parameters:

file_path (str) – Full path to the .rda file.

Returns:

The result from pyreadr.read_r(), containing all objects in the .rda file.

Return type:

dict