score | R Documentation |
Assign logical
variable positive
as TRUE
or
FALSE
in a data.frame of fluorescent intensity values based
on the cutoff values in the argument bgnd
.
score(df, bgnd = NULL, param = "mfi", ...)
df |
A data.frame generated by |
bgnd |
A numeric vector of length one or a named numeric vector for
each level of the grouping variable, typically |
param |
A character string identifying the variable to be scored. |
... |
Additional arguments for |
A variable named positive
will be added to the data.frame if
necessary and assigned TRUE
or FALSE
if the value
named in "param"
is greater than the appropriate value in
bgnd
. If bgnd == NULL
, getBgnd
will be called
with any additional arguments in ...
to determine the background.
# Small set of data by stack
f <- system.file("extdata", "by_stack", package = "virustiter")
i <- getImages(f, pattern = "file005")
v <- parseImages(i)
# Score with grouping value of "file"
v <- score(v, by = "file")
xtabs(~ positive, v)
plot(log(mfi) ~ area, v, col = c(1,2)[positive + 1])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.