bio_bires: Function to plot if results above or below cut-off line

View source: R/bio_bires.R

bio_biresR Documentation

Function to plot if results above or below cut-off line

Description

This function catagorises data points into above or below a cut-off plane

Usage

bio_bires(
  x,
  y,
  df.data,
  x.plane,
  y.plane,
  df.plane,
  stepwise = TRUE,
  colours = c("red", "green", "grey"),
  inc.equal = TRUE,
  labels = c("above", "below"),
  type = "point"
)

Arguments

x

y column name in data

y

x column name in data

df.data

Data frame containing x and y columns

x.plane

column name for the x axis in df.plane

y.plane

column name for the y axis in df.plane

df.plane

Date frame modelling the plane

stepwise

logical whether to plot the cutoff plane as stepwise or smoothed

colours

colour vector for higher, lower and plane values (default=c("green", "red", "grey) respectively)

inc.equal

logical whethere points on the line should be counted as above (dafault=TRUE)

labels

label for the markers (default=c("above", "below"))

type

type of plot for data (options include point (dafault), line, stepwise)

Examples

data(beavers)
df.plane = beaver1
df.data = beaver2
df.plane$temp <- df.plane$temp +0.5
bio_bires(x="time", y="temp", df.data, x.plane="time", y.plane="temp", df.plane)

KatrionaGoldmann/BioOutputs documentation built on May 21, 2022, 1:24 p.m.