Learn R Programming

mlr3db (version 0.6.0)

as_polars_backend: Convert to Polars Backend

Description

Converts to a DataBackendPolars using the polars database, depending on the input type:

  • data.frame: Creates a new mlr3::DataBackendDataTable first using mlr3::as_data_backend(), then proceeds with the conversion from mlr3::DataBackendDataTable to DataBackendPolars.

  • mlr3::DataBackend: Creates a new DataBackendPolars.

There is no automatic connection to the origin file set. If the data is obtained using scanning and the data is streamed, a connector can be set manually but is not required.

Usage

as_polars_backend(data, streaming = FALSE, ...)

Value

DataBackendPolars or mlr3::Task.

Arguments

data

(data.frame() | mlr3::DataBackend)
See description.

streaming

(logical(1))
Whether the data should be only scanned (recommended for large data sets) and streamed with every DataBackendPolars operation or loaded into memory completely.

...

(any)
Additional arguments, passed to DataBackendPolars.