fun_deriv: Add derivative

Description Usage Arguments Details Examples

Description

Add a derivative to the previously added function.

Usage

1
fun_deriv(p, fun, mouse = FALSE)

Arguments

p

Plot as initialised by funplot.

fun

Derivative, see details.

mouse

Update tip on mouse move.

Details

If mouse is set to true then tangent line is computed whenever the mouse is moved inside the canvas (let x_{0} be the mouse's abscissa then the tangent line to the poin (x_{0},f(x_{1})) is computed whenever the position of the mouse changes).

Examples

1
2
3
4
5
6
7
8
9
funplot() %>%
  fun_add("x^2") %>%
  fun_deriv("2 * x", mouse = TRUE)

funplot() %>%
  fun_add("x * x") %>%
  fun_deriv("2 * x", mouse = TRUE) %>%
  fun_add("x * x * x") %>%
  fun_deriv("3 * x * x", mouse = TRUE)

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