Bernd Weiss
2007-Oct-04 02:47 UTC
[R] as.numeric(FALSE) fails after loading the Matrix package
Dear all, is this a bug?> as.numeric(FALSE)[1] 0> library(Matrix)Loading required package: lattice> as.numeric(FALSE)Error in UseMethod("as.double") : no applicable method for "as.double">Regards, Bernd> version_ platform i386-pc-mingw32 arch i386 os mingw32 system i386, mingw32 status Patched major 2 minor 6.0 year 2007 month 10 day 03 svn rev 43072 language R version.string R version 2.6.0 Patched (2007-10-03 r43072)> sessionInfo()R version 2.6.0 Patched (2007-10-03 r43072) i386-pc-mingw32 locale: LC_COLLATE=German_Germany.1252;LC_CTYPE=German_Germany.1252;LC_MONETARY=German_Germany.1252;LC_NUMERIC=C;LC_TIME=German_Germany.1252 attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] Matrix_0.999375-2 coda_0.12-1 lattice_0.16-5 loaded via a namespace (and not attached): [1] grid_2.6.0 tools_2.6.0
Bernd Weiss
2007-Oct-04 04:39 UTC
[R] as.numeric(FALSE) fails after loading the Matrix package
Bernd Weiss schrieb:> Dear all, > > is this a bug? > > >> as.numeric(FALSE) > [1] 0 >> library(Matrix) > Loading required package: lattice >> as.numeric(FALSE) > Error in UseMethod("as.double") : no applicable method for "as.double" >After doing a complette reinstallation (uninstalling R, deleting all packages) everything works fine now. Sorry for any confusion I may have caused. Bernd
Prof Brian Ripley
2007-Oct-04 06:44 UTC
[R] as.numeric(FALSE) fails after loading the Matrix package
On Thu, 4 Oct 2007, Bernd Weiss wrote:> Dear all, > > is this a bug?Did you install package Matrix under that exact version of R? This is the symptom of using a version of Matrix installed under R 2.5.x in R 2.6.0. It works correctly with the CRAN Windows versions of R 2.6.0 and Matrix. Try find("as.numeric") and see if you find one in Matrix.> > >> as.numeric(FALSE) > [1] 0 >> library(Matrix) > Loading required package: lattice >> as.numeric(FALSE) > Error in UseMethod("as.double") : no applicable method for "as.double" >> > > > Regards, > > Bernd > > > >> version > _ > platform i386-pc-mingw32 > arch i386 > os mingw32 > system i386, mingw32 > status Patched > major 2 > minor 6.0 > year 2007 > month 10 > day 03 > svn rev 43072 > language R > version.string R version 2.6.0 Patched (2007-10-03 r43072) >> sessionInfo() > R version 2.6.0 Patched (2007-10-03 r43072) > i386-pc-mingw32 > > locale: > LC_COLLATE=German_Germany.1252;LC_CTYPE=German_Germany.1252;LC_MONETARY=German_Germany.1252;LC_NUMERIC=C;LC_TIME=German_Germany.1252 > > attached base packages: > [1] stats graphics grDevices utils datasets methods base > > other attached packages: > [1] Matrix_0.999375-2 coda_0.12-1 lattice_0.16-5 > > loaded via a namespace (and not attached): > [1] grid_2.6.0 tools_2.6.0 > > ______________________________________________ > R-help at r-project.org 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. >-- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595