View source: R/as_data_backend.R
as_data_backend.Matrix | R Documentation |
Wraps a DataBackend around data.
mlr3 ships with methods for data.frame
(converted to a DataBackendDataTable
and Matrix
from package Matrix (converted to a DataBackendMatrix).
Additional methods are implemented in the package mlr3db, e.g. to connect to real DBMS like PostgreSQL (via dbplyr) or DuckDB (via DBI/duckdb).
## S3 method for class 'Matrix'
as_data_backend(data, primary_key = NULL, dense = NULL, ...)
as_data_backend(data, primary_key = NULL, ...)
## S3 method for class 'data.frame'
as_data_backend(data, primary_key = NULL, keep_rownames = FALSE, ...)
data |
( |
primary_key |
( |
dense |
( |
... |
(any) |
keep_rownames |
( |
DataBackend.
Chapter in the mlr3book: https://mlr3book.mlr-org.com/chapters/chapter10/advanced_technical_aspects_of_mlr3.html#sec-backends
Package mlr3db to interface out-of-memory data, e.g. SQL servers or duckdb.
Other DataBackend:
DataBackend
,
DataBackendDataTable
,
DataBackendMatrix
# create a new backend using the penguins data:
as_data_backend(palmerpenguins::penguins)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.