Learn R Programming

kader (version 0.0.8)

cuberoot: Cube-root that retains its argument's sign

Description

Computes \((x_1^{1/3}, \ldots, x_n^{1/3})\) with \(x_i^{1/3}\) being negative if \(x_i < 0\).

Usage

cuberoot(x)

Arguments

x

Numeric vector.

Value

Vector of same length and mode as input.

Examples

Run this code
# NOT RUN {
kader:::cuberoot(x = c(-27, -1, -0, 0, 1, 27))
# }
# NOT RUN {
curve(kader:::cuberoot(x), from = -27, to = 27)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab