Description Usage Arguments Value Examples
View source: R/database-functions.R
Establishes a connection to an SQLite database for storing Peak.list; if doesn't exist, creates new database
1 | connect_peakdb(file.base, db.dir, mem)
|
file.base |
character return from gen_filebase function |
db.dir |
character what should the database directory be called.
Default is |
mem |
logical should database be in-memory. Default is |
Formal class SQLiteConnection
1 2 3 4 5 6 7 8 9 10 11 12 | library(LUMA)
if(require(RSQLite, quietly = TRUE)) {
# is case sensitive on Linux
file <- system.file('extdata','Sample_Data.csv', package = "LUMA")
sample_data <- read.table(file, header = TRUE, sep = ",")
mzdatafiles <- sample_data$CT.ID
file.base <- gen_filebase(mzdatafiles = mzdatafiles, BLANK = FALSE, IonMode =
"Positive", ion.id = c("Pos","Neg")) #Returns "Peaklist_Pos"
peak_db <- connect_peakdb(file.base = file.base, mem = TRUE)
dbIsValid(peak_db) #valid database is created
dbDisconnect(peak_db)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.