tcplLoadData {tcpl} | R Documentation |
Load tcpl data
Description
tcplLoadData
queries the tcpl databases and returns a data.table with
data for the given level and data type.
Usage
tcplLoadData(lvl, fld = NULL, val = NULL, type = "mc", add.fld = TRUE)
Arguments
lvl |
Integer of length 1, the level of data to load |
fld |
Character, the field(s) to query on |
val |
List, vectors of values for each field to query on. Must be in the same order as 'fld'. |
type |
Character of length 1, the data type, "sc" or "mc" |
add.fld |
Boolean if true we want to return the additional parameters fit with tcplfit2 |
Details
The data type can be either 'mc' for mutliple concentration data, or 'sc' for single concentration data. Multiple concentration data will be loaded into the 'mc' tables, whereas the single concentration will be loaded into the 'sc' tables.
Setting 'lvl' to "agg" will return an aggregate table containing the m4id with the concentration-response data and m3id to map back to well-level information.
Leaving fld
NULL will return all data.
Valid fld
inputs are based on the data level and type:
type | lvl | Queried tables |
sc | 0 | sc0 |
sc | 1 | sc0, sc1 |
sc | agg | sc1, sc2_agg |
sc | 2 | sc2 |
mc | 0 | mc0 |
mc | 1 | mc0, mc1 |
mc | 2 | mc0, mc1, mc2 |
mc | 3 | mc0, mc1, mc3 |
mc | agg | mc3, mc4_agg |
mc | 4 | mc4 |
mc | 5 | mc4, mc5 |
mc | 6 | mc4, mc6 |
mc | 7 | mc4, mc7 |
Value
A data.table containing data for the given fields.
See Also
Examples
## Store the current config settings, so they can be reloaded at the end
## of the examples
conf_store <- tcplConfList()
tcplConfExample()
## Load all of level 0 for multiple-concentration data, note 'mc' is the
## default value for type
tcplLoadData(lvl = 0)
## Load all of level 1 for single-concentration
tcplLoadData(lvl = 1, type = "sc")
## List the fields available for level 1, coming from tables mc0 and mc1
tcplListFlds(tbl = "mc0")
tcplListFlds(tbl = "mc1")
## Load level 0 data where the well type is "t" and the concentration
## index is 3 or 4
tcplLoadData(lvl = 1, fld = c("wllt", "cndx"), val = list("t", c(3:4)))
## Reset configuration
options(conf_store)