Squaring Numbers

sq(x)

Arguments

x

Must be a numeric object.

Value

Squares the values in the numeric object.

Examples

sq(c(1,3,5))
#> [1] 1 9 25
sq(1:10)
#> [1] 1 4 9 16 25 36 49 64 81 100