Description Usage Arguments Examples
By using a lm or loess model as discriminant, the function outputs a dataframe where each brain area ("my_grouping") is provided with a strategy score ("strategy"). The strategy score is a number between 0 and 1, where 1 indicates that all samples of that brain area were categorized in "count strategy", and 0 that all samples of that brain area were categorized as "intensity strategy"
1 | categorize_strategy(region_df, group_to_categorize, lm_or_loess = "lm")
|
region_df |
region_based dataframe. Each row is a brain area ("my_grouping") per sample ("sample_id"), where corrected cell count ("cells_perthousand") and average maximum intensity of the protein of interest ("intensity") have been summarized. It can be output from summarize_per_region(), where the meta variable "group" has been added. |
group_to_categorize |
refers to the group to categorize. All groups are used to build the discriminant. |
lm_or_loess |
specify the type of model to build the discriminant. Can have values c("lm", "loess"). Defaults to lm. |
1 2 3 4 5 6 7 8 9 10 | x <- data.frame(
batch = rep(c(1,1,2,2), each = 5),
group = rep(c("control", "exp", "exp", "control"), each = 5),
sample_id = rep(c("a", "b", "c", "d"), each = 5),
my_grouping = rep(c("CA1", "CA2", "CA3", "DG", "BLA"), 4),
intensity = sample(10000, 20, replace = TRUE),
cells_perthousand = abs(rnorm(20))
)
y <- categorize_strategy(x, "control")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.