Re: [Rd] tzone DB lawsuit Implications for R-project?
To put this nest-poking to rest, see http://www.iana.org/time-zones On Fri, 7 Oct 2011, Prof Brian Ripley wrote: Not as yet. Many much bigger users than us (almost all Unix-alike OSes, Java, Tcl, MySQL, PostgreSQL, Oracle, ...) have more resources to investigate. Note that we only use the database on Windows, and only because OS services are woefully inadequate on that platform: we could go back to using those services On Fri, 7 Oct 2011, Jeff Ryan wrote: Does anyone from core have a comment on the implications for the R-project on this: http://www.theregister.co.uk/2011/10/07/unix_time_zone_database_destroyed/ Given the inclusion of the TZ database with R as well as the functionality used by R, is this something that the FSF is looking at yet? Best,Jeff __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel -- 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 -- 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
Re: [Rd] Error message library()
BTW: an ever more intuitive solution (IMHO) would be to auto-complete package names in library( ... Deepayan?;) That is non-intrusive and in line with the general use of R. (Simon) This is indeed a long wanted feature and to my surprise it actually already exists!!! (seems that Deepayan did not tell anybody about it ;) ) The help page ?completion in the utils package explains how to enable it: utils::rc.settings(ipck=TRUE) It simply worked on my Ubuntu box -- and directly went in my .Rprofile :) Hope this helps. Renaud -- Renaud Gaujoux Computational Biology - University of Cape Town South Africa __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] tzone DB lawsuit Implications for R-project?
And an article with some extra information on it: http://www.usatoday.com/tech/news/story/2011-10-16/time-zone-database-ICANN/50793890/1 On Fri, Oct 28, 2011 at 12:12 PM, Prof Brian Ripley rip...@stats.ox.ac.uk wrote: To put this nest-poking to rest, see http://www.iana.org/time-zones On Fri, 7 Oct 2011, Prof Brian Ripley wrote: Not as yet. Many much bigger users than us (almost all Unix-alike OSes, Java, Tcl, MySQL, PostgreSQL, Oracle, ...) have more resources to investigate. Note that we only use the database on Windows, and only because OS services are woefully inadequate on that platform: we could go back to using those services On Fri, 7 Oct 2011, Jeff Ryan wrote: Does anyone from core have a comment on the implications for the R-project on this: http://www.theregister.co.uk/2011/10/07/unix_time_zone_database_destroyed/ Given the inclusion of the TZ database with R as well as the functionality used by R, is this something that the FSF is looking at yet? Best,Jeff __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel -- 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, UK Fax: +44 1865 272595 -- 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, UK Fax: +44 1865 272595 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel -- Joris Meys Statistical consultant Ghent University Faculty of Bioscience Engineering Department of Mathematical Modelling, Statistics and Bio-Informatics tel : +32 9 264 59 87 joris.m...@ugent.be --- Disclaimer : http://helpdesk.ugent.be/e-maildisclaimer.php __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Output multiline verbatim in Rd files with \Sexpr in PDF manual
Hi, I want to output some generated text in verbatim in a Rd file, but do not succeed in getting it render well in all versions (text, html and pdf). I tried something like: \Sexpr[results=verbatim, stage=render]{cat(line\nnext line)} I use Rdconv to render each version of the man page. This produced the expected effect in html, but resulted in a single line line next line in the pdf and text versions. Moreover, if I add an empty line as in: \Sexpr[results=verbatim, stage=render]{cat(line\nnext line\n\nyet another line)} then the html is still correctly rendered, the text version correctly shows the empty newline (but still not the firts line break), and the pdf cannot be generated from the Latex code (because \AsIs breaks on the newline). I tried several combination of options (results=text, rd) and rd commands (\cr, \preformated) but these are always somehow escaped when generating the Latex file. Is there a way to go around these issues? Maybe I am not using the correct way. Thank you. Renaud -- Renaud Gaujoux Computational Biology - University of Cape Town South Africa __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] R CMD check and error in an \Sexpr in an Rd file
Hi, another Rd related issue I encountered is that if an error occurs in an \Sexpr in an Rd file, then on get the following error: * checking for portable compilation flags in Makevars ... OK * checking for portable use of $(BLAS_LIBS) and $(LAPACK_LIBS) ... OK * checking examples ... ERROR Error in paste(before, x, after, sep = ) : object 'exfile' not found Execution halted To reproduce, put a call like this in an Rd section: \Sexpr[results=verbatim, stage=render]{x - 1; stop(sexpr error)} The strange thing is that it occurs at the example checking step. Not sure why it does not break before. Thank you. Renaud PS: I am on R version 2.13.2 (2011-09-30) - x86_64-pc-linux-gnu (64-bit) -- Renaud Gaujoux Computational Biology - University of Cape Town South Africa __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Output multiline verbatim in Rd files with \Sexpr in PDF manual
On 28/10/2011 10:36 AM, Renaud Gaujoux wrote: Hi, I want to output some generated text in verbatim in a Rd file, but do not succeed in getting it render well in all versions (text, html and pdf). I tried something like: \Sexpr[results=verbatim, stage=render]{cat(line\nnext line)} I use Rdconv to render each version of the man page. This produced the expected effect in html, but resulted in a single line line next line in the pdf and text versions. Moreover, if I add an empty line as in: \Sexpr[results=verbatim, stage=render]{cat(line\nnext line\n\nyet another line)} then the html is still correctly rendered, the text version correctly shows the empty newline (but still not the firts line break), and the pdf cannot be generated from the Latex code (because \AsIs breaks on the newline). I tried several combination of options (results=text, rd) and rd commands (\cr, \preformated) but these are always somehow escaped when generating the Latex file. Is there a way to go around these issues? Maybe I am not using the correct way. Which version of R are you using? There was a bug in 2.13.2 that caused some strange behaviour. Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] R CMD check and error in an \Sexpr in an Rd file
On 28/10/2011 10:49 AM, Renaud Gaujoux wrote: Hi, another Rd related issue I encountered is that if an error occurs in an \Sexpr in an Rd file, then on get the following error: * checking for portable compilation flags in Makevars ... OK * checking for portable use of $(BLAS_LIBS) and $(LAPACK_LIBS) ... OK * checking examples ... ERROR Error in paste(before, x, after, sep = ) : object 'exfile' not found Execution halted To reproduce, put a call like this in an Rd section: \Sexpr[results=verbatim, stage=render]{x- 1; stop(sexpr error)} The strange thing is that it occurs at the example checking step. Not sure why it does not break before. Thank you. Renaud PS: I am on R version 2.13.2 (2011-09-30) - x86_64-pc-linux-gnu (64-bit) I would update to 2.13.2 patched, or the release candidate of 2.14.0. Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Error message library()
On Oct 28, 2011, at 6:49 AM, Renaud Gaujoux wrote: BTW: an ever more intuitive solution (IMHO) would be to auto-complete package names in library( ... Deepayan?;) That is non-intrusive and in line with the general use of R. (Simon) This is indeed a long wanted feature and to my surprise it actually already exists!!! (seems that Deepayan did not tell anybody about it ;) ) The help page ?completion in the utils package explains how to enable it: utils::rc.settings(ipck=TRUE) Oh, well, the fact that it's off by default defeats the purpose, since the users that would benefit from it most are unlikely to mess with local configuration files... But thanks for finding it! Simon It simply worked on my Ubuntu box -- and directly went in my .Rprofile :) Hope this helps. Renaud -- Renaud Gaujoux Computational Biology - University of Cape Town South Africa __ 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] R CMD check and error in an \Sexpr in an Rd file
On 28/10/2011 10:53 AM, Duncan Murdoch wrote: On 28/10/2011 10:49 AM, Renaud Gaujoux wrote: Hi, another Rd related issue I encountered is that if an error occurs in an \Sexpr in an Rd file, then on get the following error: * checking for portable compilation flags in Makevars ... OK * checking for portable use of $(BLAS_LIBS) and $(LAPACK_LIBS) ... OK * checking examples ... ERROR Error in paste(before, x, after, sep = ) : object 'exfile' not found Execution halted To reproduce, put a call like this in an Rd section: \Sexpr[results=verbatim, stage=render]{x- 1; stop(sexpr error)} The strange thing is that it occurs at the example checking step. Not sure why it does not break before. Thank you. Renaud PS: I am on R version 2.13.2 (2011-09-30) - x86_64-pc-linux-gnu (64-bit) I would update to 2.13.2 patched, or the release candidate of 2.14.0. Oops, sorry, 2.13.2 is final, so I didn't backport the patch. 2.14.0 is what you should get. Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Error message library()
On Fri, Oct 28, 2011 at 6:49 AM, Renaud Gaujoux ren...@mancala.cbio.uct.ac.za wrote: BTW: an ever more intuitive solution (IMHO) would be to auto-complete package names in library( ... Deepayan?;) That is non-intrusive and in line with the general use of R. (Simon) This is indeed a long wanted feature and to my surprise it actually already exists!!! (seems that Deepayan did not tell anybody about it ;) ) The help page ?completion in the utils package explains how to enable it: utils::rc.settings(ipck=TRUE) It simply worked on my Ubuntu box -- and directly went in my .Rprofile :) Hope this helps. Also in terms of what exists now, on Windows the Packages Load Package menu on Rgui provides a gui interface to library() from which one chooses the package from a list so one can't ask for one that does not exist. -- Statistics Software Consulting GKX Group, GKX Associates Inc. tel: 1-877-GKX-GROUP email: ggrothendieck at gmail.com __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Error message library()
On Oct 28, 2011, at 12:02 PM, Gabor Grothendieck wrote: On Fri, Oct 28, 2011 at 6:49 AM, Renaud Gaujoux ren...@mancala.cbio.uct.ac.za wrote: BTW: an ever more intuitive solution (IMHO) would be to auto- complete package names in library( ... Deepayan?;) That is non-intrusive and in line with the general use of R. (Simon) This is indeed a long wanted feature and to my surprise it actually already exists!!! (seems that Deepayan did not tell anybody about it ;) ) The help page ?completion in the utils package explains how to enable it: utils::rc.settings(ipck=TRUE) It simply worked on my Ubuntu box -- and directly went in my .Rprofile :) Hope this helps. Also in terms of what exists now, on Windows the Packages Load Package menu on Rgui provides a gui interface to library() from which one chooses the package from a list so one can't ask for one that does not exist. On a Mac with R.app the same facility exists which I how I check to see if a package is available in one of four forms (mac-binary, mac- source, Bioc-binary, Bioc-source). -- David Winsemius, MD West Hartford, CT __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Sweave, cairo_pdf, CJK, ghostscript
Reading ?RWeaveLatex more carefully, I worked out that the outcome I want could be achieved without patching R, by having this towards the beginning: custom=hide= cairo - function(name, width, height, ...) grDevices::cairo_pdf(file = paste(name, pdf, sep = .), width = width, height = height) @ Then declaring grdevice= like this: another1,fig=TRUE,pdf=FALSE,grdevice=cairo,eval=TRUE,width=6,height=3= grid.text(\u4F60\u597D, y=2/3, gp=gpar(fontfamily=CNS1)) @ So all is well. is there any chance of either updating ?RWeaveLatex with this actual use-case example, or make it easier with the attached patch (and updated version of what I did, just adding the corresponding documentation)? I thought there might be a a use for cairo_ps() as well, but then most people who can do latex could do pdflatex, especially those who has cairo installed. FWIW, besides Chinese, I am doing Tibetan and Arabic as well - needed/wanted those two for Sichuan (south-western China) and Ningxia (northern western, just south of Mongolia). --- On Sun, 23/10/11, Hin-Tak Leung ht...@users.sourceforge.net wrote: --- On Sat, 22/10/11, Prof Brian Ripley rip...@stats.ox.ac.uk wrote: On Sat, 22 Oct 2011, Duncan Murdoch wrote: On 11-10-21 8:57 PM, Hin-Tak Leung wrote: I have had some fun in the last few days trying to put together an annotated map of China with R and some public GIS data: http://sourceforge.net/projects/outmodedbonsai/files/snpMatrix%20next/1.17.7.11/China_Choropleth_Maps.pdf/download It is done, and rather nice... there are a few issues: - the default pdf() device cannot do CJK with embedded fonts - and cairo_pdf() is not hooked up to Sweave yet. I have had a quick look, and it does not look too complicated, other than the fact that cairo_pdf() is mutually exclusive with pdf(); and the jpeg/png are new to 2.13 so it is probably just nobody has gotten round to it. (and cairo_pdf() also behaves differently with the onefile option). I guess I am almost saying I might get my hand dirty or help somebody else who wants to. So it is probably best to start some discussion. It is not hard to write your own device functions, especially in 2.14.0. See rgl::rgl.Sweave for an example. And guess what the example in the Sweave manual uses? cairo_pdf() ... I don't want a new device - I just wanted cairo_pdf() to be hooked up to Sweave as an alternative to the default pdf(). See my later post with the patch against R trunk and the worked examples. It looks like cairo_pdf() is just using my current fontconfig settings. diff --git a/src/library/utils/R/SweaveDrivers.R b/src/library/utils/R/SweaveDrivers.R index edc0a84..32ac493 100644 --- a/src/library/utils/R/SweaveDrivers.R +++ b/src/library/utils/R/SweaveDrivers.R @@ -60,7 +60,7 @@ RweaveLatexSetup - options - list(prefix = TRUE, prefix.string = prefix.string, engine = R, print = FALSE, eval = TRUE, fig = FALSE, -pdf = TRUE, eps = FALSE, png = FALSE, jpeg = FALSE, +pdf = TRUE, cairo = FALSE, eps = FALSE, png = FALSE, jpeg = FALSE, grdevice = , width = 6, height = 6, resolution = 300, term = TRUE, echo = TRUE, keep.source = TRUE, results = verbatim, @@ -98,6 +98,9 @@ makeRweaveLatexCodeRunner - function(evalFunc = RweaveEvalWithOpt) version = options$pdf.version, encoding = options$pdf.encoding, compress = options$pdf.compress) +cairo.Swd - function(name, width, height, ...) +grDevices::cairo_pdf(file = paste(chunkprefix, pdf, sep = .), + width = width, height = height) eps.Swd - function(name, width, height, ...) grDevices::postscript(file = paste(name, eps, sep = .), width = width, height = height, @@ -119,6 +122,10 @@ makeRweaveLatexCodeRunner - function(evalFunc = RweaveEvalWithOpt) devs - c(devs, list(pdf.Swd)) devoffs - c(devoffs, list(grDevices::dev.off)) } +if (options$cairo) { +devs - c(devs, list(cairo.Swd)) +devoffs - c(devoffs, list(grDevices::dev.off)) +} if (options$eps) { devs - c(devs, list(eps.Swd)) devoffs - c(devoffs, list(grDevices::dev.off)) @@ -151,6 +158,7 @@ makeRweaveLatexCodeRunner - function(evalFunc = RweaveEvalWithOpt) if (options$fig) { if (options$eps) cat( eps) if (options$pdf) cat( pdf) +if (options$cairo) cat( cairo) if (options$png) cat( png) if (options$jpeg) cat( jpeg) if (!is.null(options$grdevice)) cat(,