add: The sum !

Description Usage Arguments Details Value Examples

View source: R/Funs.R

Description

This wonderful function will calculate for you the sum of any two numerical vectors.

Usage

1
add(x, y, plot = FALSE)

Arguments

x

A numeric vector

y

A numeric vector

plot

A logical argument to produce (plot = TRUE) or not a plot.

Details

For more details see https://en.wikipedia.org/wiki/Summation.

Value

A numeric vector of x+y and, if plot = TRUE, a plot of y vs x.

Examples

1
2
3
4
5
# sum of two numbers
add(1, 1)

# sum of two vectors
add(c(1,2),1:8)

elghouch/My1Pck documentation built on Nov. 4, 2019, 11:51 a.m.