Install 'gam' package

Hi All

I am trying to install the "gam" package into KNIME.

 

Currently I am attempting this in an R Learner node using the code:

install.packages("gam",repos=getOption("http://cran.ma.imperial.ac.uk/"))

 

Which is giving me the error:

> install.packages("gam",repos=getOption("http://cran.ma.imperial.ac.uk/"))
Error in zip.unpack(pkg, tmpDir) : zipfile 'gam' not found
Calls: install.packages -> .install.winbinary -> unpackPkgZip -> zip.unpack
Execution halted

 

Why can't it find the package? I am guessing my code is fine and I thought that KNIME linked directly with R so would have everything? I did run an update to be sure, but I get the same error message.

Do I have to download it somehow first and then run the install.packages line?

 

Any help is much appreciated.

Emily

 

 

I guess you are referring to this package http://cran.r-project.org/web/packages/mgcv/mgcv.pdf which provides a method called "gam", so the package mgcv need to be installed. In order to use it just enter library("mgcv"). KNIME comes along with a base R version, currently 2.12, and provides some additional packages for example pmml among others. If you need additional packages, those need to be installed on top using the way you mentioned.

Thank you very much Gabriel. 'mgcv' worked perfectly.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.