Description Usage Arguments Examples
View source: R/manage_aba_atlas.R
The Allen Brain Atlas is organized with a tree structure, where smaller brain areas (e.g. nuclei) are grouped into larger brain areas. This function allows you to find the parent of a sub-brain area of choice. Returns only one level up in the tree structure.
1 | find_parents(atlas, child)
|
atlas |
Data frame with (at least) two character variables: one for the parents (parent_acronym), and one for the children (acronym). |
child |
Acronym of the child brain area. It must be a character vector of length 1. |
1 2 3 4 5 6 | #' x <- data.frame(
parent_acronym = c(rep("main_parent", 3), rep("child_with_children", 2), "grandchild_with_children"),
acronym = c("main_parent", "child_with_children", "child_without_children", "grandchild_with_children", "grandchild_without_children", "great_grandchild"))
this_child <- "child_with_children"
find_parents(atlas = x, child = this_child)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.