Robert D. Merithew
2001-Sep-01 20:53 UTC
[R] interpolation and numerical differentiation in R ?
Hi, I'm trying to determine if R is useful to me. I've browsed 'The Basics of S and S-Plus' (Krause & Olson), and like the logic of the language. However, I don't see an easy way to do things like this: * given a set of observations (x,y) (x and y equal-length vectors), and a 2nd set of abscissas x2, interpolate y at the new abscissas x2. (for now, I don't really care what kind of interpolation -- linear, some type of spline, etc.) * given observations (x,y), (with unequally-spaced x), create vector z with the numerical derivative of y with respect to x (eg evaluated at the values x). I'm sure I could loop over the observations and do the interpolation and differentiation point-by-point, but that kind of defeats the purpose of a 'vectorized' environment, I think. I analyze data from solid-state physics experiments, and very little of the analysis is really *statistical*, so it may be that R is the wrong tool for me. If anyone can point me toward documentation covering how to do tasks like the above in R, I'd appreciate it. thanks, -Robert Merithew, PhD rdm28 at cornell.edu LASSP, Cornell University Ithaca, NY -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Douglas Bates
2001-Sep-01 22:38 UTC
[R] interpolation and numerical differentiation in R ?
"Robert D. Merithew" <merithew at ccmr.cornell.edu> writes:> Hi, > > I'm trying to determine if R is useful to me. I've browsed 'The Basics of > S and S-Plus' (Krause & Olson), and like the logic of the language. > However, I don't see an easy way to do things like this: > > > * given a set of observations (x,y) (x and y equal-length vectors), and a > 2nd set of abscissas x2, interpolate y at the new abscissas x2. (for now, > I don't really care what kind of interpolation -- linear, some type of > spline, etc.)See interpSpline in the splines library.> * given observations (x,y), (with unequally-spaced x), create vector z > with the numerical derivative of y with respect to x (eg evaluated at the > values x).When evaluating the interpolating spline produced by interpSpline you can specify that you want derivatives instead of the function value. -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Philippe Grosjean
2001-Sep-03 07:43 UTC
[R] interpolation and numerical differentiation in R ?
Oh sorry, The correct address is: http://www.sciviews.org/_passtec>>>>> "Philippe" == Philippe Grosjean <phgrosje at ulb.ac.be> writes:Philippe> About interpolation, note that a new package is in Philippe> construction which will provide some more interpolations Philippe> methods, including area method... and also some functions for Philippe> calculating best regular interval to keep much of the Philippe> irregular serie information (for instance, using turning Philippe> points, i.e., information theory). Some code is already Philippe> available at http://www.sciviews/_passtec. For the moment, it Philippe> is in French only and code is not packaged into a library Philippe> yet. But you could get an idea of what it can do at a quick Philippe> glance by browsing the manual (if you can read French). Final Philippe> library with manual in English will be uploaded to CRAN in 4 Philippe> or 5 months. It could help or not depending on your Philippe> requirements... Interesting, thank you Philippe! Since I can read French pretty well, I wanted to look at it. However, for me, http://www.sciviews/_passtec doesn't seem to be valid. Have you mis-typed something? Bonnes salutations, Martin Maechler <maechler at stat.math.ethz.ch> http://stat.ethz.ch/~maechler/ Seminar fuer Statistik, ETH-Zentrum LEO D10 Leonhardstr. 27 ETH (Federal Inst. Technology) 8092 Zurich SWITZERLAND phone: x-41-1-632-3408 fax: ...-1228 <>< -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._