mergePdata | R Documentation |
Merge "phenotype" data describing the samples in an image data.frame.
mergePdata(
phenoData,
imageData,
moi = c("moi", "x"),
stringsAsFactors = TRUE,
formatString = NULL
)
phenoData |
A |
imageData |
A |
moi |
Character name for multiplicity variable, either "moi" or "x". |
stringsAsFactors |
Convert string variables to factors if |
formatString |
Character string as |
The format for well names (and column names) may differ between the imageData
and phenoData. An "Error in mergePData(pd, df)" might report "A1, A2, <...>
are missing from pd." This can happen if, for example, the imageData uses only
a few of the possible 96 wells in phenoData. Change the formatString
parameter to a value such as "%02d" to force a consistent format. This value
is passed to the well.info
as the parameter format
.
This function performs a data.frame
merge with additional checks. It
does not (yet) respect the 'plate' variable and only merges according to the
well
or file
variables. For now, it is necessary to split
the phenoData and imageData by plate
, merge each separately,
and then join the data back together. The following might work with phenoData
in pd
and imageData in df
:
g <- pd$plate pd <- split(pd, g) df <- split(df, df$plate) df <- Map(mergePdata, pd, df) df <- do.call(rbind, df) rownames(df) <- NULL pd <- unsplit(pd, g)
Merged data.frame
with harmonized well information (if appropriate)
and additional data provided in phenoData
. The variables row
,
column
, and well
are expected to be factors.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.