[R] nth root

David Winsemius dwinsemius at comcast.net
Thu Mar 19 20:43:02 CET 2009

x^(1/n)  # ?
exp(log(x)/n) # ?

Either of those could be rolled into a function with the desired name:

On Mar 19, 2009, at 11:21 AM, Martin Biuw wrote:

> Hi,
> Is there a function in R to calculate the nth root, similar to the
> MATLAB function NTHROOT()?
> Thanks,
> Martin Biuw

David Winsemius, MD
Heritage Laboratories
West Hartford, CT

More information about the R-help mailing list