Re: [Rd] Updated Windows toolchain
CRAN Windows binary packages built for R-devel are now online, and Uwe's winbuilder has gained the ability to check source packages under R-devel. Windows check results are available from http://cran.r-project.org/bin/windows/contrib/checkSummaryWin.html and in due course from the main CRAN check page. There have been a few updates to the toolchain: (i) It is now based on a beta of gcc 4.6.3, and so reports almost the same compilation warnings/errors as the CRAN check machines. (ii) There are various bug-fixes to the toolchain: notably x^n and exp(x) use gradual underflow to denormal numbers rather than abrubtly underflowing to zero. (iii) This is a 'multilib' toolchain: the compiler is named 'gcc.exe' for both architectures, selected by flag -m32 (the default) and -m64. On 29/11/2011 07:56, Prof Brian Ripley wrote: An updated toolchain is now being used for Windows' builds of R-devel: details are in the R-admin manual and at http://www.murdoch-sutherland.com/Rtools/ and http://www.stats.ox.ac.uk/pub/Rtools/ Both 32- and 64-bit parts of the toolchain use v2.0.1 of the Mingw-w64 project's runtime and a beta of gcc 4.5.4: the Mingw.org project's builds are no longer used. This should mean that code which compiles for 64-bit Windows also compiles for 32-bit Windows, and v.v. unless code makes (incorrect but common) assumptions that pointers fit into longs. A very few packages will need modifications because they contain declarations which clash with the headers in this toolchain: where we are aware of problems the maintainers have been informed. At DLL level different Windows' toolchains should be compatible: at C level they mostly are but at C++ level they are pretty much incompatible (so that for example GDAL has to be re-compiled for every toolchain: and Rcpp users need to be careful to use only one toolchain for Rcpp and their packages). All the external software previously made available (and more) is made available at http://www.stats.ox.ac.uk/pub/Rtools . The toolchain has support for OpenMP and pthreads: however OpenMP support is not enabled by default in R (it is too slow to be much use). If you do make use of it in your packages, be aware that you will need to ship the appropriate pthreads DLL(s). It is expected that there will be several further minor updates prior to the release of 2.15.0 in ca 4 months, but this step is the major one. -- Brian D. Ripley, rip...@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, UKFax: +44 1865 272595 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] serializing recordedplot object
I use recordPlot() to save plots to disk that I render later to a variety of formats. This works fine for base R plots and ggplot2 plots, and also used to work for lattice plots. However somewhere in version 2.14 things stopped working for lattice plots. Here is an example: library(lattice); histogram(rnorm(100)); x <- recordPlot(); saveRDS(x, "myplot.rds"); y <- readRDS("myplot.rds"); print(y); Error: NULL value passed as symbol address printing x works fine, but printing y either gives an error or prints an empty page. The problem seems to be related to serializing the recordedplot object, which contains a lot of memory pointers. Any tips or workarounds? > sessionInfo() R version 2.14.1 (2011-12-22) Platform: i686-pc-linux-gnu (32-bit) locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C [3] LC_TIME=en_US.UTF-8LC_COLLATE=en_US.UTF-8 [5] LC_MONETARY=en_US.UTF-8LC_MESSAGES=en_US.UTF-8 [7] LC_PAPER=C LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] lattice_0.20-0 loaded via a namespace (and not attached): [1] grid_2.14.1 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] problem with R installation package
Dear, I have created my first package "G2Sd : Grain Size Statistiques and Description". I submitted it to the CRAN after I have checked the tar.gz file. All was ok, but since it is on the CRAN I can't install it : In getDependencies(pkgs, dependencies, available, lib) : package ?G2Sd? is not available (for R version 2.13.2) I've got the same message with R 2.14.1. In the description file, I wrote in the "Depends" item R (>=2.10.0) In the namespace file : import("stats","graphics") export(granstat,granplot) Can you help me? Regis Régis GALLON Doctorant MNHN Station Marine de Dinard Centre de recherche et d'enseignement sur les écosystèmes côtiers 38 rue du Port Blanc, 35800 Dinard. -- PhD student French national museum of natural history Dinard Marine Station Center for research and teaching on coastal ecosystem 38 rue du port blanc, 35800 Dinard, FRANCE web : http://regisgallon.wordpress.com/ Tél : +33 (0)2 23 18 58 85 Fax : +33 (0)2 23 18 58 80 Port : +33 (0)6 60 84 38 12 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] problem with R installation package
2012/1/9 Gallon Régis : > Dear, > > I have created my first package "G2Sd : Grain Size Statistiques and > Description". I submitted it to the CRAN after I have checked the tar.gz > file. All was ok, but since it is on the CRAN I can't install it : > > In getDependencies(pkgs, dependencies, available, lib) : > package ?G2Sd? is not available (for R version 2.13.2) > > I've got the same message with R 2.14.1. > > In the description file, I wrote in the "Depends" item R (>=2.10.0) > In the namespace file : > import("stats","graphics") > export(granstat,granplot) > > Can you help me? > Looks like it hasn't (yet) build for all platforms; try install.packages("G2Sd", type="source") Dan > Regis > > > > > > > Régis GALLON > Doctorant MNHN > > Station Marine de Dinard > Centre de recherche et d'enseignement sur les écosystèmes côtiers > 38 rue du Port Blanc, 35800 Dinard. > -- > PhD student > French national museum of natural history > > Dinard Marine Station > Center for research and teaching on coastal ecosystem > 38 rue du port blanc, > 35800 Dinard, FRANCE > > web : http://regisgallon.wordpress.com/ > Tél : +33 (0)2 23 18 58 85 > Fax : +33 (0)2 23 18 58 80 > Port : +33 (0)6 60 84 38 12 > > __ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] problem with R installation package
Hi Regis, As you can see on the cran page of your package, no binaries have been build yet for windows or osx. This can take a couple of days, you have to be patient. For now you can install your package from source using: install.packages("G2Sd", type="source") ps: This is a question for the r-help mailing list, not r-devel. -- View this message in context: http://r.789695.n4.nabble.com/problem-with-R-installation-package-tp4280190p4280212.html Sent from the R devel mailing list archive at Nabble.com. __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] S4 summary method not being called (VGAM)
The symptom triggering this email is that an S4 summary method sometimes refuses to be invoked, even when a package is explicitly loaded, if the first load of the package is implicit. It may or may not be specific to 'summary' methods and/or the 'VGAM' package. I've sent to R-devel because (i) it looks like some kind of bug to me, but I'm not sure; (ii) it's not something I personally need any help with; and (iii) it seems a bit specialized for R-help. Here's the case notes. I have an object 'nf1' of S4 class 'vglm', created by calling 'vglm(...)' from package 'VGAM' (you can create your own from the examples in VGAM). It's save()d into a file "nf1.rda". If I start a new R session, call 'library( VGAM)', and then 'load("nf1.rda")', then 'summary(nf1)' works fine. But if instead I start a pretty basic R session and load() the file *without* having explicitly called library( VGAM), the summary method for 'vglm' doesn't get called whether or not I subsequently call library( VGAM). Transcript below. I'm using R 2.13.2 on Windows XP, VGAM 0.8-4. The same thing happens with R 2.15 devel v57866. bye Mark Mark Bravington CSIRO CMIS Marine Lab Hobart Australia # # Start a basic R session, and then: > search() [1] ".GlobalEnv""package:stats4""package:splines" "package:stats" "package:graphics" [6] "package:grDevices" "package:utils" "package:datasets" "package:methods" "Autoloads" "package:base" > print( load( "nf1.rda")) # which should implicitly load VGAM, but not attach > it [1] "nf1" > search() # ...snipped. No explicit VGAM > loadedNamespaces() # ...snipped. VGAM is there at the end. > nf1 Call: vglm(formula = form, family = posbinomial, data = data, trace = TRUE) Coefficients: # ...snipped. The print() or show() or whatever method seems to get called OK > summary( nf1) Length Class Mode 1 vglm S4 # Hmmm... default method is being called, that's wrong. Try explicitly attaching 'VGAM': > library( VGAM) Loading required package: splines Loading required package: stats4 Attaching package: 'VGAM' The following object(s) are masked from 'package:splines': bs, ns The following object(s) are masked from 'package:stats': biplot, case.names, coefficients, df.residual, fitted, fitted.values, formula, poly, residuals, variable.names, weights The following object(s) are masked from 'package:base': identity, print, scale.default > summary( nf1) Length Class Mode 1 vglm S4 # Hmmm... even though VGAM is on the search path etc, the wrong method is being called ### __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] serializing recordedplot object
The underlying problem turns out to be serialization of objects of class "NativeSymbolInfo". When these are serialized and unserialized, the memory address turns into a nullpointer, causing the fail. To fix it, one can simply create new nativeSymbolInfo objects. E.g: # The old example: library(lattice); histogram(rnorm(100)); x <- recordPlot(); saveRDS(x, "myplot.rds"); y <- readRDS("myplot.rds"); # y contains nullpointers making it fail. print(y); # To fix: for(i in 1:length(y[[1]])) { if( "NativeSymbolInfo" %in% class(y[[1]][[i]][[2]][[1]]) ){ y[[1]][[i]][[2]][[1]] <- getNativeSymbolInfo(y[[1]][[i]][[2]][[1]]$name); } } print(y); Now this works, but it is a bit ugly. Is there a more general method of serializing objects in a way that native objects are restored where possible? On Mon, Jan 9, 2012 at 12:47 AM, Jeroen Ooms wrote: > > I use recordPlot() to save plots to disk that I render later to a > variety of formats. This works fine for base R plots and ggplot2 > plots, and also used to work for lattice plots. However somewhere in > version 2.14 things stopped working for lattice plots. Here is an > example: > > library(lattice); > histogram(rnorm(100)); > x <- recordPlot(); > saveRDS(x, "myplot.rds"); > y <- readRDS("myplot.rds"); > print(y); > Error: NULL value passed as symbol address > > printing x works fine, but printing y either gives an error or prints > an empty page. The problem seems to be related to serializing the > recordedplot object, which contains a lot of memory pointers. Any tips > or workarounds? > > > sessionInfo() > R version 2.14.1 (2011-12-22) > Platform: i686-pc-linux-gnu (32-bit) > > locale: > [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C > [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 > [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 > [7] LC_PAPER=C LC_NAME=C > [9] LC_ADDRESS=C LC_TELEPHONE=C > [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C > > attached base packages: > [1] stats graphics grDevices utils datasets methods base > > other attached packages: > [1] lattice_0.20-0 > > loaded via a namespace (and not attached): > [1] grid_2.14.1 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel