[R] calculating arc length using R?

Giovanni Petris GPetris at uark.edu
Fri Nov 14 16:14:47 CET 2003


It seems you want to integrate a function. Try

?integrate

You can do the math yourself if the function is simple, like sin(x). 
Otherwise I suspect you could combine integrate with `deriv', although
you will slow down the calculations somehow (just a guess).

HTH
Giovanni  

> Date: Thu, 13 Nov 2003 21:37:46 -0500
> From: Greg Trafton <trafton at itd.nrl.navy.mil>
> Sender: r-help-bounces at stat.math.ethz.ch
> Precedence: list
> User-Agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.2 (darwin)
> 
> Hi, All.  I have a function I want to know the plotted length of.  is it
> possible to calculate the length of the function (e.g., arc length)?
> 
> for example, if I want to know the length of the line of
> sin(x) from -pi to pi, how can I do that in R?
> 
> thanks!
> greg
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> 
> 

-- 

 __________________________________________________
[                                                  ]
[ Giovanni Petris                 GPetris at uark.edu ]
[ Department of Mathematical Sciences              ]
[ University of Arkansas - Fayetteville, AR 72701  ]
[ Ph: (479) 575-6324, 575-8630 (fax)               ]
[ http://definetti.uark.edu/~gpetris/              ]
[__________________________________________________]




More information about the R-help mailing list