AddAllBreathTestRecords: Reads and saves multiple 13C Breath test records

Description Usage Arguments Value Examples

View source: R/HandleBreathTestDatabase.R

Description

Reads all BreathID and Iris/Wagner data records in a directory. Computes several fit parameters and a fit, and writes these to the database. Files that are already in the database are skipped. Note only the base name is tested, so that files with the same name in different directories are considered identical without testing.

Usage

1

Arguments

path

start path for recursive search; can be a vector of multiple start paths.

con

connection to sqlite database

Value

A dataframe with columns file, basename, recordID (NULL if not saved) and status with levels "saved", "skipped", "invalid".

Examples

1
2
3
4
5
6
7
8
9
if (exists("con")) suppressWarnings(dbDisconnect(con))
sqlitePath = tempfile(pattern = "Gastrobase", tmpdir = tempdir(), fileext = ".sqlite")
unlink(sqlitePath)
CreateEmptyBreathTestDatabase(sqlitePath)
con = OpenSqliteConnection(sqlitePath)
path = dirname(
  system.file("extdata", "350_20043_0_GER.txt", package = "D13CBreath"))
AddAllBreathTestRecords(path,con)
dbDisconnect(con)

dmenne/d13cbreath documentation built on March 1, 2020, 3:41 a.m.