Description Usage Arguments Details Value Examples
View source: R/data_selection.R
Extracts from a lum_export
or data.frame
object controls,
dilutions points, background and samples to be calibrated.
These files can be merged to an expected concentration and flag dataset.
1 2 3 4 5 |
x |
a |
ecfile |
a |
flagsfile |
a |
backname |
character vector or list of the background samples
identification of |
stanname |
character vector or list of the standard points
identification of |
posname |
character vector or list of the positive controls
identification of |
unkname |
character vector or list of the samples identification
of |
byvar.ecfile |
character vector of the merging variable(s)
of |
byvar.flagsfile |
character vector of the merging variable(s)
of |
fsample |
character vector of the name of the sample variable. |
fanalyte |
character vector of the name of the analyte variable. |
fbatch |
character vector of the name of the Batch variable. |
... |
other options. Ignored. |
Default method for identifying background, standard and
positives samples is to define a character vector of length one and
apply agrep
functions in order to extract databases.
Samples to be calibrated (unknowns) are identified as the
remaining ones (default NULL
).
If the arguments are defined as a list the function will
subset exactly that information from x
object.
The expected concentration file is merged based on byvar.ecfile
.
Only applies when ecfile
is not NULL
. Same applies for flags file.
A variable named 'flag' must be in flags data in order to perform the merge.
The name of the batch in a list format with the following components: background, standard, positive and unknowns datasets.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | # Load data
data(ecdata)
data(mfidata)
dat <- subset(mfidata,plate=="plate_1" & analyte=="FGF")
# Example 1
sdf <- data_selection(dat)
lapply(sdf$plate_1, function(x) head(x))
# Example 2 (merge ecdata)
sdf <- data_selection(dat, ecfile = ecdata,
byvar.ecfile=c("analyte","sample"))
lapply(sdf$plate_1, function(x) head(x))
# Example 3 (extract specific samples names with list)
sdf <- data_selection(dat,
stanname=list("Standard10"),
backname = list("Background0"),
posname = list("Control1","Control2"),
unkname = list("B_sid_13_CSP"))
lapply(sdf$plate_1, function(x) head(x))
# Example 4 (extract aproximate names samples)
sdf <- data_selection(dat,
stanname="Standard1",
backname = "Background0",
posname = "Control1",
unkname = "B_sid_13_CSP")
lapply(sdf$plate_1, function(x) (x))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.