R/testfun.R

testfun <-
function (x, k) 
{
    if (missing(k)) {
        6 * x + 3 * sin(x * (4 * pi)) + 5 * cos(x * (4 * pi))
    }
    else {
        2 - 5 * x + 2.5 * k * exp(-200 * k * (x - 0.5)^2)
    }
}

Try the sharpPen package in your browser

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

sharpPen documentation built on April 3, 2025, 7:10 p.m.