knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  fig.width = 6,
  out.width = "100%",
  fig.retina = 3
)

ggsegDefaultExtra

DOI Codecov test coverage R build status

This package contains dataset for plotting the extra datasets based on the default ggseg and ggseg3d atlases: Desikan-Killany cortical atlas (dk) and the aseg subcrotical atlas.

dkextra contains both superior and inferior views of the inflated brain for the dk-atlas
hcpa_3d contains the aseg atlas, with additional division of the hippocampus into anterior and posterior parts

Installation

We recommend installing the ggseg-atlases through the ggseg r-universe:

# Enable this universe
options(repos = c(
    ggseg = 'https://ggseg.r-universe.dev',
    CRAN = 'https://cloud.r-project.org'))

# Install some packages
install.packages('ggsegDefaultExtra')

You can install the released version of ggsegDefaultExtra from GitHub with:

# install.packages("remotes")
remotes::install_github("LCBC-UiO/ggsegDefaultExtra")

Example

This is a basic example which shows you how to solve a common problem:

library(ggsegDefaultExtra)
library(ggseg)
library(ggplot2)

plot(dkextra) +
  theme(legend.position = "bottom",
        legend.text = element_text(size = 7)) +
  guides(fill = guide_legend(ncol = 3))
library(ggseg3d)
library(dplyr)

ggseg3d(atlas = hcpa_3d) %>% 
  add_glassbrain("left") %>% 
  pan_camera("right lateral")
library(ggseg3d)
library(dplyr)

p <- ggseg3d(atlas = hcpa_3d) %>%
  add_glassbrain("left") %>% 
  pan_camera("right lateral") %>%
  plotly::add_annotations( text="Screen capture",
                  legendtitle=TRUE, showarrow=FALSE,
                  font = list(color = "#000000b4",
                              family = 'sans serif',
                              size = 50))
plotly::orca(p, "man/figures/README-3d-plot.png")
knitr::include_graphics("man/figures/README-3d-plot.png")


LCBC-UiO/ggsegDefaultExtra documentation built on June 8, 2021, 9:25 p.m.