R: Retrieve a Single Data Set

load_dataset {mlr3misc} | R Documentation

## Retrieve a Single Data Set

### Description

Loads a data set with name `id` from package `package` and returns it. If the package is not installed, an error with condition "packageNotFoundError" is raised. The name of the missing packages is stored in the condition as `packages`.

### Usage

    load_dataset(id, package, keep_rownames = FALSE)

### Arguments

`id` | (`character(1)`) Name of the data set.
`package` | (`character(1)`) Package to load the data set from.
`keep_rownames` | (`logical(1)`) Keep possible row names (default: `FALSE`).

### Examples

    head(load_dataset("iris", "datasets"))

[Package mlr3misc version 0.9.5 Index]