Learn R Programming

avstrat (version 0.1.1)

run_ggstrat_app: Launch the interactive map with stratigraphy plots

Description

This function launches a Shiny app that displays an interactive map locations with stratigraphic data. If you click on a station it will generate a stratigraphic plot with the plotting function of your choice (default is ggstrat_samples()). You can also adjust the height of the plot using the slider below the map.

Usage

run_ggstrat_app(df, plot_fun = ggstrat_samples)

Value

A Shiny app object.

Arguments

df

A data frame containing stratigraphic data.

plot_fun

A function that generates a stratigraphic plot. Defaults to ggstrat_samples().

Examples

Run this code
if (interactive()) {
# Use your default plotting function
run_ggstrat_app(example_data_strat)

# Or swap in a custom plotting function
run_ggstrat_app(example_data_strat, plot_fun = ggstrat_column)
}

Run the code above in your browser using DataLab