Description Format Construction Fields Methods
DataBackendDataTable uses data.table::data.table as back end to exploit
its fast and efficient implementations of many data operations. This includes
the :=
operator which allows a data.table object to be modified in place,
without making a copy.
R6::R6Class object inheriting from DataBackendDataFrame<-DataBackend.
1 | x <- DataBackendDataTable$new(.data, key = NULL)
|
.data
:: data.table::data.table()
The input data.table::data.table()
.
key
:: NULL
|character(1)
The key of .data
.
key
:: NULL
|character(1)
The key of .data
.
data
:: data.table::data.table()
A copy of the data.table that was used to create the backend object.
To get the reference of the data.table, use $get(copy = FALSE)
.
removed_data
:: data.table::data.table()
A copy of the removed data.
add(.data, fill = FALSE)
(data.table::data.table) -> NULL
Add data.
remove(rows, cols)
(integer()
, integer()
) -> NULL
Remove the rows in rows
and the columns in cols
in the data.
get(rows, cols, copy = TRUE)
(integer(1)
, character()
, logical(1)
) -> data.frame()
Get data. If copy is TRUE
, the returned data.table is a copy of the actual data.table
object used to create this backend object. Otherwise, the reference to the
data.table is returned which allows it to be modified with data.table::set()
and
:=
. Note that, rows
should be indexes of the data.table and cols
are
a character vector that contains column names to be returned.
view(interactive = FALSE)
(logical(1)
)
View the data. If interactive
is TRUE, the data will be shown in your
data tab if you are using RStudio.
head(n = 5)
(integer(1)
) -> data.frame()
Get the head of the data.
ncol()
() -> integer(1)
Get the number of columns.
nrow()
() -> integer(1)
Get the number of rows.
get_removed()
() -> data.frame()
Get the removed data.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.