Skip to content
Prev 332520 / 398506 Next

extraction of roots in R

If you just want the nth root of X, use X^(1/n)

 > x <- 256
 > x^(1/8)
[1] 2

 > x <- -256
 > x^(1/8)
[1] NaN

It appears that you get the positive real root.

Is this all you wanted?
On 1-Nov-13, at 11:11 AM, Gary Dong wrote:

            
Don McKenzie
Pacific Wildland Fire Sciences Lab
US Forest Service

Affiliate Professor
School of Environmental and Forest Sciences
University of Washington

dmck at uw.edu