add_noise: add_noise: Adds noise to any function

View source: R/add_noise.R

add_noiseR Documentation

add_noise: Adds noise to any function

Description

add_noise: Adds noise to any function

Usage

add_noise(func, noise = 0, noise_type = "Gauss")

Arguments

func

Function to add noise to.

noise

Standard deviation of Gaussian noise

noise_type

Type of noise, only option now is "Gauss" for Gaussian noise.

Value

A function that has noise

Examples

tf <- add_noise(function(x)sin(2*x*pi));curve(tf)
tf <- add_noise(function(x)sin(2*x*pi), noise=.1);curve(tf)

TestFunctions documentation built on Sept. 30, 2024, 9:31 a.m.