shuffle_plots: A function to plot HeFTy and date-eU plots side by side...

View source: R/shuffle_plot.R

shuffle_plotsR Documentation

A function to plot HeFTy and date-eU plots side by side (shuffled)

Description

This function will take a tidy dataframe of (U-Th)/He data and make simple plots it

Usage

shuffle_plots(
  hedf,
  bestfitdf = NULL,
  heftydf,
  constraints,
  synthetic = NULL,
  eUbin = NULL,
  helim = c(NA, NA),
  eUlim = c(NA, NA),
  timelim = c(NA, NA),
  templim = c(NA, NA)
)

Arguments

hedf

tidy dataframe with (U-Th)/He data and columns labeled "eU", "Date", "Unc", "Color", "Sample", "Description", "Elevation_m"

bestfitdf

dataframe containing prediction of best fit path from hefty. must have column names equal to "eU", "Date",and "Sample"

heftydf

tidy dataframe extracted from HeFTy paths extracted with 'readpaths()'

constraints

dataframe with HeFTy constraints extracted with 'readconstraints()'

synthetic

dataframe with synthetic/binned data points used in HeFTy modelling. Must have column names equal to "eU", "Date", "Unc", and "Sample"

eUbin

value or vector for eU value(s) where bins are split for HeFTy modeling

helim

limits for the y (He date) axis, must be a vector of 2-defaults to NA where limits are set based on the total dataset starting at 0

eUlim

limits for the x (eU) axis, must be a vector of 2-defaults to NA where limits are set based on the total dataset starting at 0

timelim

vector of length 2 with limits for time (x) axis. Defaults to NA where limits are set based on the total dataset starting at 0

templim

vector of length 2 with limits for temperature (y) axis. Defaults to NA, where limits are set based on the total dataset

Examples

fn=system.file("extdata","AHe_data.csv",package="thermochronplotr")
hedf<-readr::read_csv(fn)
fn2=system.file("extdata","ForwardModels.csv",package="thermochronplotr")
bestfitdf <- readr::read_csv(fn2)
fn3 = system.file("extdata","HeFTyOut-Sample1",package="thermochronplotr")
fn4 = system.file("extdata","HeFTyOut-Sample2",package="thermochronplotr")
heftydf<-readpaths(c(fn3,fn4),c('Sample1','Sample2'))
constraints<-readconstraints(c(fn3,fn4),c('Sample1','Sample2'))
shuffle_plots(ahe,forward,hefty,constraints,eUbin = 15)

jstanley26/thermochronplotr documentation built on June 4, 2022, 11:05 a.m.