square: Square of Numeric Objects

Description Usage Arguments Value Author(s) Examples

Description

Generic function for the square of numeric objects

Usage

1
square(x, na.rm = FALSE)

Arguments

x

a numeric object

na.rm

OPTIONAL if TRUE removes all NAs before calculating the square

Value

The square of object x is computed, as x to the power of 2

Author(s)

Claudia Faltermeier, claudia.faltermeier@uzh.ch

Examples

1
2
3
4
5
6
square(2)
# 4
square(-2)
# 4
square(0)
# 0

ClaudiaFaltermeier/square documentation built on May 13, 2019, 4:49 p.m.