Re: [R] get the value of a biplane

2017-05-29 Thread David Winsemius
> On May 29, 2017, at 1:16 PM, Duncan Murdoch wrote: > > On 29/05/2017 3:15 PM, Jeff Newmiller wrote: >> Well, then I will hedge by saying that IN MY OPINION it is an error, because >> when it isn't exported the arguments not specified in the generic cannot be >> visible for argument completio

Re: [R] get the value of a biplane

2017-05-29 Thread Duncan Murdoch
On 29/05/2017 3:15 PM, Jeff Newmiller wrote: Well, then I will hedge by saying that IN MY OPINION it is an error, because when it isn't exported the arguments not specified in the generic cannot be visible for argument completion in editors. But that's not true. If you want the arguments , u

Re: [R] get the value of a biplane

2017-05-29 Thread Jeff Newmiller
Well, then I will hedge by saying that IN MY OPINION it is an error, because when it isn't exported the arguments not specified in the generic cannot be visible for argument completion in editors. The predict.lm function specifies new data with the newdata argument, while the predict.bs functio

Re: [R] get the value of a biplane

2017-05-29 Thread Rui Barradas
Hello, Em 29-05-2017 10:43, Duncan Murdoch escreveu: On May 28, 2017 1:53:29 PM PDT, Rui Barradas wrote: > predict.bs(SCurve, xnew = 40:45) Error in predict.bs(SCurve, xnew = 40:45) : could not find function "predict.bs" You should call it using the generic, i.e. predict(SCurve, xnew =

Re: [R] get the value of a biplane

2017-05-29 Thread Duncan Murdoch
On May 28, 2017 1:53:29 PM PDT, Rui Barradas wrote: > predict.bs(SCurve, xnew = 40:45) Error in predict.bs(SCurve, xnew = 40:45) : could not find function "predict.bs" You should call it using the generic, i.e. predict(SCurve, xnew = 40:45) On 29/05/2017 2:35 AM, Jeff Newmiller wrote:

Re: [R] get the value of a biplane

2017-05-28 Thread Jeff Newmiller
Looks like it is not exported from the package namespace... a packaging error. -- Sent from my phone. Please excuse my brevity. On May 28, 2017 1:53:29 PM PDT, Rui Barradas wrote: >Hello, > >Can anyone explain why this error? > > > library(splines) > > > > knots <- c(6, 12, 22, 30, 35) > > x <-

Re: [R] get the value of a biplane

2017-05-28 Thread Rui Barradas
Hello, Can anyone explain why this error? > library(splines) > > knots <- c(6, 12, 22, 30, 35) > x <- c(0.0, .25, 1.0, 2.0, 3.0) > SCurve <- bs(x = x, knots = knots, intercept = FALSE, Boundary.knots = c(0,3.5)) > class(SCurve) [1] "bs" "basis" "matrix" > > ?predict.bs > predict.bs(SCurve

Re: [R] get the value of a biplane

2017-05-28 Thread Rui Barradas
Hello, Since function splines::bs returns an object of class bs in order to read the help page for function predict you need ?predict.bs The syntax would be ## S3 method for class 'bs' predict(object, newx, ...) Please read that help page and maybe you'll get the answer you need. Hope this

[R] get the value of a biplane

2017-05-28 Thread Glenn Schultz
If is specify a spline basis as follows knots <- c(6, 12, 22, 30, 35) x <- c(0.0, .25, 1.0, 2.0, 3.0) SCurve <- bs(x = x, knots = knots, intercept = FALSE, Boundary.knots = c(0,3.5)) I would like to now get the spline value for new values of x.  However, when I use predict the new basis is retu