Re: [R] Derivative of a smooth function

2010-04-04 Thread Julien Gagneur
Hi Fir, you can alternatively use local regression, implemented in the package locfit, which can also estimate derivatives: library(locfit) attach(cars) # main fit fit <- locfit( dist ~ speed ) # fit 1st derivative fitd <- locfit( dist ~ speed , deriv =1) # plots... plot(speed, dist ) lines(fit)

Re: [R] Derivative of a smooth function

2010-04-03 Thread Chidambaram Annamalai
While this doesn't answer your question, I want to let you know that there is a proposal for a related improvement within R that will let users compute (numerically) the derivatives, of any order, of a given function inside of R. In your case, this means that you will write the smooth spline functi

Re: [R] Derivative of a smooth function

2010-04-02 Thread Ravi Varadhan
Please learn how to use `RsiteSearch' before posting questions to the list: RSiteSearch("derivative smooth function") This should have provided you with plenty of solutions. Ravi. Ravi Varadhan, Ph.D. Assistant Professor, Di