# \donttest{
library(plotly)
f <- function(x) x^2
out <- secant_tangent(f, x0 = 1)
out$plot
out$derivative
g <- function(x) sin(x)
secant_tangent(g, x0 = 0.7, method = "central", h_vals = 2^(-(1:7)))
# }
Run the code above in your browser using DataLab