skdatasets.repositories.cran.fetch_dataset

skdatasets.repositories.cran.fetch_dataset(dataset_name: str, package_name: str, *, package_url: Optional[str] = None, version: Optional[str] = None, folder_name: Optional[str] = None, subdir: Optional[str] = None, converter: Optional[Converter] = None) Mapping[str, Any][source]

Fetch an R dataset.

Only .rda datasets in community packages can be downloaded for now.

R datasets do not have a fixed structure, so this function does not attempt to force one.

Parameters:
  • dataset_name (string) – Name of the dataset, including extension if any.

  • package_name (string) – Name of the R package where this dataset resides.

  • package_url (string) – Package url. If None it tries to obtain it from the package name.

  • version (string) – If package_url is not specified, the version of the package to download. By default is the latest one.

  • folder_name (string) – Name of the folder where the downloaded package is stored. By default, is the last component of package_url.

  • subdir (string) – Subdirectory of the package containing the datasets. By default is ‘data’.

  • converter (rdata.conversion.Converter) – Object used to translate R objects into Python objects.

Returns:

data – Dictionary-like object with all the data and metadata.

Return type:

dict