importToExpData {Genominator} | R Documentation |
This function imports data from a data frame to a table in a database.
importToExpData(df, dbFilename, tablename, overwrite = FALSE, verbose = getOption("verbose"), columns = NULL)
df |
A data frame containing data to be imported. Must have columns |
dbFilename |
The filename of the database to which the data will be imported. |
tablename |
Name of database table to write output data to. |
overwrite |
Logical indicating whether database table referred to in |
verbose |
Logical indicating whether details should be printed. |
columns |
Vector of column names of columns to be imported. |
Returns an object of class ExpData
.
James Bullard bullard@berkeley.edu, Kasper Daniel Hansen khansen@jhsph.edu
See Genominator
vignette for more information. See also ExpData-class
.
N <- 10000 # the number of observations. df <- data.frame(chr = sample(1:16, size = N, replace = TRUE), location = sample(1:1000, size = N, replace = TRUE), strand = sample(c(1L,-1L), size = N, replace = TRUE)) eDataRaw <- importToExpData(df, dbFilename = tempfile(), tablename = "ex_tbl", overwrite = TRUE)