Append a data frame, Andromeda table, or result of a query on an Andromeda table to an existing Andromeda table.

If data from another Andromeda is appended, a batch-wise copy process is used, which will be slower than when appending data from within the same Andromeda object.

Important: columns are appended based on column name, not on column order. The column names should therefore be identical (but not necessarily in the same order).

appendToTable(tbl, data)

Arguments

tbl

An Andromeda table. This must be a base table (i.e. it cannot be a query result).

data

The data to append. This can be either a data.frame or another Andromeda table.

Value

Returns no value. Executed for the side-effect of appending the data to the table.

Examples

andr <- andromeda(cars = cars)
nrow(andr$cars)
#> [1] NA
# [1] 50

appendToTable(andr$cars, cars)
nrow(andr$cars)
#> [1] NA
# [1] 100

appendToTable(andr$cars, andr$cars %>% filter(speed > 10))
nrow(andr$cars)
#> [1] NA
# [1] 182

close(andr)