brain_join: Join atlas and data

View source: R/brain_join.R

brain_joinR 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")


LCBC-UiO/ggbrain documentation built on April 10, 2023, 6:09 p.m.