search for: mspline

Displaying 2 results from an estimated 2 matches for "mspline".

Did you mean: spline
2010 Mar 06
1
Possible to use array of spline functions for storing data?
...toy implementations puzzle me when I examine them, and I cannot seem to store them properly. Say you start with a vector of qx's: > qx = c(.001, .003, 0.005, 0.01, 0.03, 0.06, 0.12, 0.24,0.4, 0.8) # Now convert to mortality > mx <- 2*qx/(2-qx) # And make a spline function > mspline <- splinefun(mx) # Works well. > mspline(5.5) # [1] 0.04466954 # Examine the spline function > mspline function (x, deriv = 0) { deriv <- as.integer(deriv) if (deriv < 0 || deriv > 3) stop("'deriv' must be between 0 and 3") if (deriv &gt...
2009 Sep 15
1
Help with error on function: Error in .... attempt to apply non-function
Dear R gurrus, I wrote this function http://scsys.co.uk:8002/33852?ln=on&store=on&submit=Format+it! for a small package I am preparing. Whenever I run the function I get the error Error in Mspline(i = i, x = x, degree = kk, t = t) : attempt to apply non- function Anyone could point me out what I am doing wrong? kubuntu 904 64 bit, R 2.9.2 Regards -- Corrado Topi Global Climate Change & Biodiversity Indicators Area 18,Department of Biology University of York, York, YO10 5YW, UK Phon...