tcplPlot: #—————— Generic Plotting Function for tcpl

View source: R/tcplPlot.R

tcplPlotR Documentation

#——————————————————————————- Generic Plotting Function for tcpl

Description

tcplLoadData queries the tcpl databases and returns a plot for the given level and data type.

Usage

tcplPlot(
  lvl = 5,
  fld = "m4id",
  val = NULL,
  type = "mc",
  by = NULL,
  output = c("console", "pdf", "png", "jpg", "svg", "tiff"),
  fileprefix = paste0("tcplPlot_", Sys.Date()),
  multi = NULL,
  verbose = FALSE,
  nrow = NULL,
  ncol = NULL,
  dpi = 600
)

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".

by

Parameter to divide files into e.g. "aeid".

output

How should the plot be presented. To view the plot in application, use "console", or to save as a file type, use "pdf", "jpg", "png", "svg", or "tiff".

fileprefix

Prefix of file when saving.

multi

Boolean, by default TRUE for "pdf". If multi is TRUE, output by default 4 plots per page for 'verbose' = TRUE and 6 plots per page for 'verbose' = FALSE.

verbose

Boolean, by default FALSE. If TRUE, a table with fitting parameters is included with the plot.

nrow

Integer, number of rows in multiplot. By default 2.

ncol

Integer, number of columns in multiplot. By default 3, 2 if verbose.

dpi

Integer, image print resolution. By default 600.

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.

Examples

## Store the current config settings, so they can be reloaded at the end
## of the examples
conf_store <- tcplConfList()
tcplConfExample()

tcplPlot(lvl = 4, fld = "m4id", val = c(18609966)) ## Create a level 4 plot

## Reset configuration
options(conf_store)

tcpl documentation built on Oct. 7, 2023, 1:06 a.m.