curve_intersect: Intersection Between Two Curves

Description Usage Arguments Details

View source: R/curve_intersect.R

Description

This function finds a point that represents the intersection between two curves.

Usage

1
curve_intersect(curve1, curve2, domain = NULL)

Arguments

curve1, curve2

These are each either data.frames where the first column contains the x-axis values of each line, and the second column contains the y-axis values, or functions with a single input and a single numerical output. If you mix a function with a data frame, the function will be evaluated at all of the x-axis points included in the data.frame.

domain

If both curve1 and curve2 are functions, they will be evaluated over the domain of domain.

Details

This code is lightly modified from the function written by Andrew Heiss [here](https://github.com/andrewheiss/supply-demand-ggplot).


NickCH-K/ggwhiteboard documentation built on June 23, 2020, 11:23 p.m.