Calculates the error function.
Arguments
- x
A vector of values on the real number line.
Value
A vector of transformed values based on the error function.
Examples
plot(c(-2, 2), c(-1, 1), type = "n", xlab = "x", ylab = "erf(x)")
x <- seq(-2, 2, length = 100)
abline(h = c(-1, 1), col = "grey")
lines(x, erf(x))