Elliot Joel Bernstein
2012-Jul-31 15:33 UTC
[R] Error Installing Package with Dependency on "Matrix"
I'm attempting to update to R 2.15.1, and I'm having trouble with a
package
that depends on the "Matrix" package. I've created a dummy package
consisting only of a DESCRIPTION file that specifies the dependence on
"Matrix", a NAMESPACE file, and an R directory, containing a single
function, "square <- function(x) { return (x*x) }". When I try to
install,
I get the following error:
[ebernstein@coolio R]$ R CMD INSTALL temp -l /home/ebernstein/Rlib_2.15.1/
* installing *source* package ‘temp’ ...
** R
** preparing package for lazy loading
Error : .onLoad failed in loadNamespace() for 'Matrix', details:
call: assignInNamespace("..Old..as.matrix", base::as.matrix, ns =
"base")
error: locked binding of ‘..Old..as.matrix’ cannot be changed
Error : package ‘Matrix’ could not be loaded
ERROR: lazy loading failed for package ‘temp’
* removing ‘/home/ebernstein/Rlib_2.15.1/temp’
If I remove the dependency on "Matrix", it installs fine. I'm
using R
2.15.1 on linux, and version 1.0-6 of the Matrix package. Can anyone
explain what's going on here?
Thanks.
- Elliot
--
Elliot Joel Bernstein, Ph.D. | Research Associate | FDO Partners, LLC
134 Mount Auburn Street | Cambridge, MA | 02138
Phone: (617) 503-4619 | Email: elliot.bernstein@fdopartners.com
[[alternative HTML version deleted]]
Elliot Joel Bernstein
2012-Jul-31 15:49 UTC
[R] Error Installing Package with Dependency on "Matrix"
A follow up on this issue...if I first build the package using "R CMD build temp", I can install the resulting .tar.gz file from within R using the "install.packages" command, but I still can't install it from the command line using "R CMD INSTALL". - Elliot On Tue, Jul 31, 2012 at 11:33 AM, Elliot Joel Bernstein < elliot.bernstein@fdopartners.com> wrote:> I'm attempting to update to R 2.15.1, and I'm having trouble with a > package that depends on the "Matrix" package. I've created a dummy package > consisting only of a DESCRIPTION file that specifies the dependence on > "Matrix", a NAMESPACE file, and an R directory, containing a single > function, "square <- function(x) { return (x*x) }". When I try to install, > I get the following error: > > [ebernstein@coolio R]$ R CMD INSTALL temp -l /home/ebernstein/Rlib_2.15.1/ > * installing *source* package ‘temp’ ... > ** R > ** preparing package for lazy loading > Error : .onLoad failed in loadNamespace() for 'Matrix', details: > call: assignInNamespace("..Old..as.matrix", base::as.matrix, ns = "base") > error: locked binding of ‘..Old..as.matrix’ cannot be changed > Error : package ‘Matrix’ could not be loaded > ERROR: lazy loading failed for package ‘temp’ > * removing ‘/home/ebernstein/Rlib_2.15.1/temp’ > > If I remove the dependency on "Matrix", it installs fine. I'm using R > 2.15.1 on linux, and version 1.0-6 of the Matrix package. Can anyone > explain what's going on here? > > Thanks. > > - Elliot > > -- > Elliot Joel Bernstein, Ph.D. | Research Associate | FDO Partners, LLC > 134 Mount Auburn Street | Cambridge, MA | 02138 > Phone: (617) 503-4619 | Email: elliot.bernstein@fdopartners.com > >-- Elliot Joel Bernstein, Ph.D. | Research Associate | FDO Partners, LLC 134 Mount Auburn Street | Cambridge, MA | 02138 Phone: (617) 503-4619 | Email: elliot.bernstein@fdopartners.com [[alternative HTML version deleted]]
I had the same problem by trying to install the mgcv package. The problem came from the Matrix package library(Matrix) => same error as yours I have reinstalled the Matrix package, now everything work fines best chris -- View this message in context: http://r.789695.n4.nabble.com/Error-Installing-Package-with-Dependency-on-Matrix-tp4638544p4644862.html Sent from the R help mailing list archive at Nabble.com.