DataBackendDataTable

0th

Percentile

DataBackend for data.table

DataBackend for data.table as an in-memory data base.

Keywords
datasets
Format

R6::R6Class object inheriting from DataBackend.

Construction

DataBackendDataTable$new(data, primary_key = NULL)
as_data_backend(data, primary_key = NULL, ...)

DataBackendDataTable does not copy the input data, while as_data_backend calls data.table::copy(). as_data_backend creates a primary key column as integer column if primary_key is NULL.

Fields

See DataBackend.

Methods

See DataBackend.

See Also

Other DataBackend: DataBackendMatrix, DataBackend, as_data_backend

Aliases
  • DataBackendDataTable
Examples
# NOT RUN {
data = as.data.table(iris)
data$id = seq_len(nrow(iris))
b = DataBackendDataTable$new(data = data, primary_key = "id")
print(b)
b$head()
b$data(rows = 100:101, cols = "Species")

b$nrow
head(b$rownames)

b$ncol
b$colnames

# alternative construction
as_data_backend(iris)
# }
Documentation reproduced from package mlr3, version 0.1.0-9000, License: MIT + file LICENSE

Community examples

Looks like there are no examples yet.