vignettes/An_Introduction_to_TestFunctions.R

## ------------------------------------------------------------------------
set.seed(0)
library(TestFunctions)
branin(runif(2))
branin(matrix(runif(20), ncol=2))

## ------------------------------------------------------------------------
cf::cf(banana)

## ---- fig.show='hold'----------------------------------------------------
tf1 <- function(xx) powsin(x=matrix(xx,ncol=1),  noise=0)
curve(tf1, main="Function without noise")


x1 <- runif(1e2)
y1 <- powsin(x=matrix(x1,ncol=1),  noise=.1)
plot(x1,y1, col=2, pch=19, cex=.3, main="Data with noise")
curve(tf1,add=T)

## ------------------------------------------------------------------------
tf <- RFF_get(D=1)
curve(tf)

## ------------------------------------------------------------------------
cf::cf(RFF_get(D=2))

Try the TestFunctions package in your browser

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

TestFunctions documentation built on May 2, 2019, 2:42 a.m.