Description Usage Arguments Value Examples
Creates a list containing all necessary metadata to subset a dataframe. Used within other functions as a useful container and stops repeated input of dataframe information.
1 | construct_metadata(df, compound_col, conc_col, feature_cols, negative_control)
|
df |
Dataframe |
compound_col |
index or name of dataframe column for compound names |
conc_col |
index or name of dataframe column for concentration data |
feature_cols |
Vector of indices that match numeric feature columns. a feature column is one that contains numerical information of a cellular measurement such as area, or cell_count. Metadata such as image_number or object_number_ID is not feature data. |
negative_control |
string, name of negative control in compound_col.
e.g |
metadata List containing all metadata.
1 2 3 4 5 6 7 8 9 10 11 12 13 | # construct example dataframe
concentration <- rep(c(100, 10, 1, 0.1), 10)
compounds <- sort(rep(letters[1:10], 4))
cell_area <- rnorm(40)
no_speckles <- rnorm(40, 100, 100)
df <- data.frame(compounds, concentration, cell_area, no_speckles)
construct_metadata(
df,
compound_col = "compounds",
conc_col = "concentration",
feature_cols = 3:4,
negative_control = "a")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.