Dear All, I would like to make the derivation of a points. I tried to use D1tr (linear interpolation). I also tried to used D1ss (spline interpolation) but I do not realy know how to choose the smothing parameter the best. D1ss(x, y, xout = x, spar.offset = 0.1384, spl.spar=NULL) Here is an example of data I would like to derive library(sfsmisc) x<-c(30:90) y<-c(39.10111,39.71601,40.4367,41.11309,42.02203,42.96469,43.88154,44.72341,45.50918,46.29508,47.29949,48.30178,49.00582,49.7295,50.50255,51.24946,51.8912,52.49289,53.11462,53.61668,54.11853,54.61826,55.16866,55.70223,56.32028,57.10335,57.95425,58.9606,60.68077,61.2205,61.7642,62.51613,63.10644,64.12183,64.67105,66.62656,67.19005,68.16018,69.29873,69.64272,70.20944,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA) D1tr() D1ss(x, y, xout = x, spar.offset = 0.1384, spl.spar=NULL) D1ss(x, y, xout = x, spar.offset = 0.1384, spl.spar=NULL) Error in smooth.spline(x, y) : NA/NaN/Inf in foreign function call (arg 4) Is there a way to return NA for points where there is an NA value as input ? Could anyone give me some advices how to choose values for these "spar.offset" and "spl.spar" parameters ? Many thanks in advance, Jessica _________________________________________ Jessica Gervais Tel: +352- 425991-628 Mail: jessica.gervais at tudor.lu Resource Centre for Environmental Technologies, Public Research Centre Henri Tudor, Technoport Schlassgoart, 66 rue de Luxembourg, P.O. BOX 144, L-4002 Esch-sur-Alzette, Luxembourg