mdb-array(1) emits C source; this wrapper returns a named R list of columns
while keeping equivalent database/table inputs.
mdb_array(path, table, columns = NULL, n = -1L)
Arguments
- path
Path to .mdb/.accdb file.
- table
Table name.
- columns
Optional character vector of columns.
- n
Optional row limit (LIMIT n).
Value
Named list, one entry per selected column.
Examples
db <- mdbr:::.mdb_example_nwind_path()
if (nzchar(db)) {
arr <- mdb_array(db, "Products", columns = c("ProductID", "ProductName"), n = 2)
str(arr)
}
#> List of 2
#> $ ProductID : int [1:2] 1 2
#> $ ProductName: chr [1:2] "Chai" "Chang"