get_example_data: Returns example data for package

View source: R/utils.R

get_example_dataR Documentation

Returns example data for package

Description

This function loads and returns example data for the package. Which dataset is returned must be specified. Data will be downloaded from Figshare the first time it is used.

Usage

get_example_data(which_data, data_dir = NULL, refresh_data = FALSE)

Arguments

which_data

One of '"count"', '"count_treatment"', '"meta"', '"gimap"', '"gimap_treatment"', or '"annotation"'; specifies which example dataset is returned.

data_dir

Where files are stored. If 'NULL' (default), example files are written under 'file.path(tempdir(), "gimap-example-data")' for the current R session (they are not kept after the session ends). Pass an explicit directory if you want a persistent copy (for example to mirror files elsewhere).

refresh_data

If 'TRUE', removes known example filenames from 'data_dir' (only under safe locations; see [delete_example_data()]) before re-downloading.

Value

the respective example data either as a data frame or a specialized gimap_dataset depending on what was requested.

Examples

## Not run: 

counts_timepoint <- get_example_data("count")
counts_treatment <- get_example_data("count_treatment")
gimap_timepoint_dataset <- get_example_data("gimap")
gimap_treatment_dataset <- get_example_data("gimap_treatment")
metadata <- get_example_data("meta")
annotation <- get_example_data("annotation")

## End(Not run)

gimap documentation built on July 10, 2026, 1:06 a.m.