sc_layers: Plots a layered model and summarizes the statistics for each...

View source: R/sc_layers.R

sc_layersR Documentation

Plots a layered model and summarizes the statistics for each layer from a Strucchange result

Description

Given a number of breakpoints, plots a layered model of one variable against distance, plots the confidence intervals for each layer, and gives a summary table.

Usage

sc_layers(x, h = 0.1, breaks, conf.level = 0.95)

Arguments

x

A data frame containing the location variable (depth or distance) in the first column, and the value of interest in the second column

h

Percent of data points per layer

breaks

An integer giving the number of breakpoints to use (from 'Strucchange')

conf.level

Confidence level to use for plot and summary statistics (Default is 0.95)

Value

A ggplot and plotly objects showing the layered model, another showing the confidence intervals, and a summary table

Examples

sc_layers(DPM_data, h = 0.1, breaks = 2)


maxgav13/GMisc documentation built on June 12, 2022, 3:48 a.m.