brain_join {ggseg} | R Documentation |
Join atlas and data
Description
Joins data frame with a brain-atlas object.
Usage
brain_join(data, atlas, by = NULL)
Arguments
data |
data.frame |
atlas |
atlas data |
by |
optional character vector of column to join by |
Value
either an sf-object (if brain atlas) or a tibble (if ggseg-atlas) with merged atlas and data
Examples
someData = data.frame(
region = c("transverse temporal", "insula",
"precentral","superior parietal"),
p = sample(seq(0,.5,.001), 4),
stringsAsFactors = FALSE)
brain_join(someData, dk)
brain_join(someData, dk, "region")
[Package ggseg version 1.6.5 Index]