order_brain_areas: Order time of activation of brain areas based on their...

Description Usage Arguments Examples

View source: R/order_brain_areas.R

Description

By using expression levels in different groups (e.g. time points), brain areas are ordered .

Usage

1
2
3
4
5
order_brain_areas(
  region_df,
  order_of_groups,
  count_var = "cells_perthousand_box_scaled_ba"
)

Arguments

region_df

region_based dataframe. Each row is a brain area ("my_grouping") per sample, with a variable for counts (e.g. "cells_perthousand_box_scaled_ba"). The variable "group" specifies the experimental group, and it is used for the ordering. It can be output from summarize_per_region() or preprocess_per_region().

order_of_groups

string with the same unique elements as region_df$group, but ordered as should be used for the analysis.

count_var

variable specified by the user on which to conduct the analysis.

Examples

1
2
3
4
5
6
7
8
# baby example
x <- data.frame(
batch = rep(c("1", "2"), 2),
group = rep(rep(c("0", "90"), each = 2), 2),
my_grouping = "CA1",
cells_perthousand_box_scaled_ba = c(-2, -1, 2, 1, -3, -2, 4, 2)
)
order_brain_areas(x, order_of_groups = c("0", "90"))

valeriabonapersona/abc4d documentation built on Dec. 23, 2021, 2:09 p.m.