Title: | Easy Interface to Effective Concentration Calculations |
Version: | 1.0.1 |
Maintainer: | Zhian N. Kamvar <zkamvar@gmail.com> |
Description: | Because fungicide resistance is an important phenotypic trait for fungi and oomycetes, it is necessary to have a standardized method of statistically analyzing the Effective Concentration (EC) values. This package is designed for those who are not terribly familiar with R to be able to analyze and plot an entire set of isolates using the 'drc' package. |
Depends: | R (≥ 3.2.0) |
Imports: | drc, dplyr |
License: | GPL-3 |
URL: | https://github.com/grunwaldlab/ezec |
BugReports: | https://github.com/grunwaldlab/ezec/issues |
LazyData: | true |
Suggests: | testthat, readxl, knitr, rmarkdown |
RoxygenNote: | 5.0.1 |
VignetteBuilder: | knitr |
NeedsCompilation: | no |
Packaged: | 2016-12-04 17:57:44 UTC; zhian |
Author: | Zhian N. Kamvar [cre, aut], Niklaus J. Grunwald [ths, ctb] |
Repository: | CRAN |
Date/Publication: | 2016-12-05 08:27:32 |
The ezec package for easy EC calculation.
Description
The ezec package for easy EC calculation.
Introduction
The package ezec is not a revolutionary work. It
simply is a wrapper for the drc package that makes life a little
easier when it comes to calculating a simple EC 50. The main function of
the package is EC_table
. This function will do as it says and
automatically produce a table to EC values for each isolate in your sample.
Data format
Data is expected to exist in a table with at least three columns:
Sample ID
Dosage
Response value (Growth)
Any other columns in your data are optional. An example data set
is dummydata
.
Function to generate a table of EC values from a data frame of multiple isolates.
Description
Function to generate a table of EC values from a data frame of multiple isolates.
Usage
EC_table(x, form = NULL, model = "LL.3", response = c(10, 50, 90),
idcol = "ID", result = "df", plot = TRUE, ...)
Arguments
x |
a data frame that has at least the columns listed in the |
form |
a formula specifying the column names for the response and dose. Defaults to NULL. |
model |
one of 4 options:
|
response |
a numeric vector specifying what EC values you want to calculate. |
idcol |
the name of the column that identifies the samples (case sensitive). |
result |
What result do you want returned? Default is "df" for a data frame of summary values. If you want the models returned, choose "model". If you want the summary output of the model, choose "summary". |
plot |
if |
... |
parameters passed on to |
Value
a data frame that contains EC estimates and standard errors in columns and samples in rows.
Author(s)
Zhian N. Kamvar
Examples
data(dummydata)
# Using 3 parameter Log-Logistic Model (default)
EC_table(dummydata, form = response ~ dose)
# Using 4 parameter Weibull Model.
EC_table(dummydata, form = response ~ dose, model = "W2.4")
# This function really only needs three columns.
newdat <- dummydata[c("ID", "dose", "response")]
EC_table(newdat, form = response ~ dose)
# We can rename them, too.
colnames(newdat) <- c("identity", "dosage", "growth")
EC_table(newdat, form = growth ~ dosage, idcol = "identity")
dummydata
Description
dummydata
Usage
data(dummydata)
Format
a data frame with 96 rows and 7 columns representing two isolates tested for Metalaxyl resistance over 6 concentrations with 8 replicates per concentration. Each rep number were conducted in separate weeks. The First sample is real and the second is fake.
Function to get EC values given a model.
Description
Function to get EC values given a model.
Usage
get_EC(x, response = c(10, 50, 90), disp = TRUE)
Arguments
x |
a model generated from the drm function of the drc package |
response |
a numeric vector specifying at what response levels to generate an EC value. Defaults to 10, 50 and 90 (percent). |
disp |
display the results? |
Details
This function is a wrapper for ED
.
Value
a data frame with the Estimate and standard error for each response value.
Author(s)
Zhian N. Kamvar
Function to generate a dose-response model from a data frame.
Description
Function to generate a dose-response model from a data frame.
Usage
get_drm(x, form = NULL, model = c("LL.3", "LL.4", "W1.4", "W2.4"),
idcol = "ID")
Arguments
x |
a data frame that has at least the columns listed in the |
form |
a formula specifying the column names for the response and dose. Defaults to NULL. |
model |
one of 4 options:
|
idcol |
the name of the column that identifies the samples (case sensitive). |
Details
A wrapper function for drm
, this will attempt to
catch errors generated due to non-finite responses. When these are
encounterd, a message that the model was not evaluated will be printed to
the screen and NA will be returned.
Author(s)
Zhian N. Kamvar