skdatasets.repositories.cran.fetch_package¶
- skdatasets.repositories.cran.fetch_package(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, ignore_errors: bool = False) Mapping[str, Any] [source]¶
Fetch all datasets from a R package.
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:
package_name (string) – Name of the R package.
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.
ignore_errors (boolean) – If True, ignore the datasets producing errors and return the remaining ones.
- Returns:
data – Dictionary-like object with all the data and metadata.
- Return type: