Skip to contents

Error function for real values

Usage

erf(x)

Arguments

x

A vector of real numbers.

Value

A real number. The integral of the gaussian, centred on zero and with standard deviation equal to 1, between 0 and x, multiplied by 2/sqrt(pi).

Examples

x <- seq(-1,1,length=1000)
y <- erf(x)
plot(x,y,type="l")