fun_secants: Add secants

Description Usage Arguments Details Examples

Description

Add secants to the previously added function.

Usage

1
fun_secants(p, x0, x1 = NULL, mouse = FALSE)

Arguments

p

Plot as initialised by funplot.

x0, x1

See details.

mouse

Update secant on mouse move.

Details

If a data object has a secants, then each object will be used to compute secant lines between two points belonging to the function, additionally if updateOnMouseMove is a property set to true in the object then (x_{0},f(x_{1})) will be used as an anchored point and (x_{0},f(x_{1})) will be computed dynamically based on the mouse abscissa.

Values for secants list:

Examples

1
2
3
4
funplot() %>%
  fun_add("x^2") %>%
  fun_secants(x0 = 5, mouse = TRUE) %>%
  fun_secants(x0 = 2, x1 = 3)

JohnCoene/funplot documentation built on May 26, 2019, 7:28 a.m.