Error Installing Package with Dependency on "Matrix"

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Error Installing Package with Dependency on "Matrix"

Elliot
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: [hidden email]

        [[alternative HTML version deleted]]


______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Error Installing Package with Dependency on "Matrix"

Elliot
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 <
[hidden email]> 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: [hidden email]
>
>

--
Elliot Joel Bernstein, Ph.D. | Research Associate | FDO Partners, LLC
134 Mount Auburn Street | Cambridge, MA | 02138
Phone: (617) 503-4619 | Email: [hidden email]

        [[alternative HTML version deleted]]


______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Error Installing Package with Dependency on "Matrix"

chrisl
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