Skip to contents

Builds a fresh harbour_dtable from CSV files, one table per file. This is not the inverse of hb_write_csv(): it produces a new base with new identifiers, and only text, number, date and checkbox columns. Nothing that a CSV cannot carry is recovered.

Usage

hb_read_csv(files, ..., base_name = "harbouR base")

Arguments

files

Paths to .csv files. Table names come from the file names unless files is named.

...

These dots are for future extensions and must be empty.

base_name

Name recorded for the new base.

Value

A harbour_dtable.

Examples

csv <- tempfile(fileext = ".csv")
utils::write.csv(data.frame(x = 1:2, y = c("a", "b")), csv,
                 row.names = FALSE)
hb_read_csv(c(Measurements = csv))
#> 
#> ── <harbour_dtable> ────────────────────────────────────────────────────────────
#> • base : "harbouR base"
#> • tables : 1
#> • rows : 2
#> • assets : 0
#> 
#> - Measurements (2 cols, 2 rows)