title: GAM() error: unused argument(s) (bs = "ps", k = 8)?
body: <p>After loading mgcv and running the below model - it returns the error below.. This code has worked in previous times (i.e. yesterday).  Any help with this would be much appreciated.</p>
  
  <pre><code>&gt; aa1&lt;-gam(Bin~s(Mud,bs="ps",k=8),family=binomial, gamma=1,data=Abaren)
  
  Error in s(Mud, bs = "ps", k = 8) : unused argument(s) (bs = "ps", k = 8)
  </code></pre>
  
  <p>--</p>
  
  <p>I'm now getting the error below.. This all seems rather strange given the fact all of this code was running perfectly just two days ago..</p>
  
  <pre><code>## UQ Abundance only data (i.e. positive values only)
  
  aa2&lt;-gam(UQdata~s(MudUQ,bs="ps", k=15) ,family=Gamma(link=log),data=Antho)
  xmin &lt;- ceiling(min(Antho$MudUQ[Antho$Bin==1]))
  xmax &lt;- floor(max(Antho$MudUQ[Antho$Bin==1]))
  Mudnew &lt;- seq(from=xmin, to=xmax, by=0.1)
  **Error in if (del == 0 &amp;&amp; to == 0) return(to) : 
                  missing value where TRUE/FALSE needed**
  pred.dat &lt;- data.frame(Mudnew)
  names(pred.dat) &lt;- "MudUQ"
  pred.aa2 &lt;- data.frame(predict.gam(aa2, pred.dat, se.fit=TRUE, type="response"))
  pred.aa2.comb &lt;- data.frame(pred.dat, pred.aa2)
  names(pred.aa2.comb)
  plot(fit ~ MudUQ, data=pred.aa2.comb, type="l", lwd=2, col=1, 
       lab="Density per 0.0132 m2", xlab="Mud content (%)")
  </code></pre>