Are there compatibility issues with mgcv R package? Are there general compatibility rules?

I am using R version 2.15.1 (2012-06-22) and mgcv version 1.7-22

I load the following set of packages into R:


library(sqldf)
library(timeDate)
library(forecast)
library(xts)
library(tseries)
library(MASS)
library(mgcv)

It happens that I cannot run a simple model (I omit the code). Even the code sample taken from the help pages:


dat = gamSim(1,n=400,dist="normal",scale=2)
b = gam(y~s(x0)+s(x1)+s(x2)+s(x3),data=dat)

gives an error:


Error in qr.qty(qrc, sm$S[[l]]) : 
  NA/NaN/Inf in foreign function call (arg 5)
In addition: Warning message:
In smoothCon(split$smooth.spec[[i]], data, knots, absorb.cons, scale.penalty = scale.penalty,  :
  number of items to replace is not a multiple of replacement length

Note that everything works fine if I just download the mgcv package and then use the sample code immediately. It also works if I just download all the packages and run the sample code. It just doesn't work if I

  • download all packages
  • execute some file reading, sqldf instructions, ts operations and some models from the package forecast.
  • If I applied GAM, it no longer works.

Apparently, variable definitions in a common environment ruined the package.

- ? , , ? , "" mgcv?

+5
2

mgcv ... , .

0

@ 2 , GAM: gam mgcv. .

+2

All Articles