inst/doc/taylor.R

## ---- include = FALSE---------------------------------------------------------
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

## ----setup--------------------------------------------------------------------
library(calculus)

## -----------------------------------------------------------------------------
partitions(n = 2, length = 3, fill = TRUE, perm = TRUE, equal = FALSE)

## -----------------------------------------------------------------------------
taylor("exp(x)", var = "x", order = 2)

## -----------------------------------------------------------------------------
f <- function(x, y) log(y)*sin(x)
taylor(f, var = c(x = 0, y = 1), order = 2)

Try the calculus package in your browser

Any scripts or data that you put into this service are public.

calculus documentation built on March 31, 2023, 11:03 p.m.