View source: R/tcplPlotLoadData.R
tcplPlotLoadData | R Documentation |
tcplPlotLoadData
queries the tcpl databases and returns a data.table
with data for the given field, value, level, and data type prepared in a
format tcplPlot can use to generate plots.
tcplPlotLoadData(type = "mc", fld = "m4id", val, flags = FALSE)
type |
Character of length 1, the data type, "sc" or "mc" |
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'. |
flags |
Boolean, by default FALSE. If TRUE, level 6 flags are loaded for use in tcplPlot. Must be set to TRUE if tcplPlot 'flags' also is/will be set to TRUE |
This utility function is used by tcplPlot
to load and prepare data from
tcplLoadData
for use in generating plots. It is exported for use in
advanced comparison plots where users create plots using multiple data sources.
After saving the response from tcplPlotLoadData
, switch data source
config and pass the data to tcplPlot
dat
parameter.
The data type
can be either 'mc' for multiple concentration data, or
'sc' for single concentration data.
A data.table containing plot-ready data for the given fields.
tcplPlot
## Not run:
## load mc plot data for an entire endpoint
dat <- tcplPlotLoadData(fld = "aeid", val = 703)
## load sc plot data for an entire endpoint
dat <- tcplPlotLoadData(type = "sc", fld = "aeid", val = 703)
## load plot data for two endpoint-samples and include loading of flags
## flags must equal TRUE if tcplPlot will/does
dat <- tcplPlotLoadData(fld = c("spid", "aeid"),
val = list(c("TP0000269F11", "TP0000395A09"),703),
flags = TRUE)
## if desired, switch connections
tcplConf()
## use dat in tcplPlot
tcplPlot(dat = dat,
fld = c("spid", "aeid"),
val = list(c("TP0000269F11", "TP0000395A09"),703),
compare.val = list(c("LEGTV002B01", "LEGTV003A06"),703),
output = "pdf",
flags = TRUE,
fileprefix="example")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.