[Rd] CRAN package check on MacOS: sh: line 1: gs: command not found
Dear R developers, I recently observed a NOTE on several MaxOS X package checks: sh: line 1: gs: command not found !!! Error: Closing Ghostscript (exit status: 127)! /usr/bin/texi2dvi: thumbpdf exited with bad status, quitting. See for details: http://www.r-project.org/nosvn/R.check/r-release-macosx-ix86/simecol-00check.html or http://www.r-project.org/nosvn/R.check/r-release-macosx-ix86/fxregime-00check.html Does anybody know what's wrong here? Thanks a lot Thomas Petzoldt -- Thomas Petzoldt Technische Universitaet Dresden Institut fuer Hydrobiologiethomas.petzo...@tu-dresden.de 01062 Dresden http://tu-dresden.de/hydrobiologie/ GERMANY __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] CRAN package check on MacOS: sh: line 1: gs: command not found
On Wed, 4 Mar 2009, Thomas Petzoldt wrote: Dear R developers, I recently observed a NOTE on several MaxOS X package checks: sh: line 1: gs: command not found !!! Error: Closing Ghostscript (exit status: 127)! /usr/bin/texi2dvi: thumbpdf exited with bad status, quitting. See for details: http://www.r-project.org/nosvn/R.check/r-release-macosx-ix86/simecol-00check.html or http://www.r-project.org/nosvn/R.check/r-release-macosx-ix86/fxregime-00check.html Does anybody know what's wrong here? Almost certainly a problem on the Mac build machine. So 1) Asking on R-sig-mac is more likely to get an answer 2) I believe Simon Urbanek is travelling and only he can do anything about that machine. Unfortunately there are rather a lot of problems with the MacOS checks, so I tend to ignore them (but then I do have a Mac or two of my own to check on). Thanks a lot Thomas Petzoldt -- Thomas Petzoldt Technische Universitaet Dresden Institut fuer Hydrobiologiethomas.petzo...@tu-dresden.de 01062 Dresden http://tu-dresden.de/hydrobiologie/ GERMANY __ 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 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Fontconfig warning with X11() on MAC OS X 10.4
I realize this doesn't directly answer your question, but seeing as you're on a Mac, have you tried using the quartz device? -roger On Wed, Feb 25, 2009 at 10:27 AM, MerliseClyde wrote: > > I posted previously about problems with X11() on my MAC using R 2.8.1 . > After installing the securilty update for Tiger this morning, X11() now > works from an xterm :-) > > However, I receive the following warnings with any plotting command using > the default X11 settings. > Fontconfig warning: no elements found. Check configuration. > Fontconfig warning: adding > /Library/Frameworks/R.framework/Resources/fontconfig/cache > Fontconfig warning: adding ~/.fontconfig > > Everything works fine with the Xlib option: > >> X11(type="Xlib") >> plot(1:10) # no problems! >> X11(type="cairo") >> plot(1:10) > Fontconfig warning: no elements found. Check configuration. > Fontconfig warning: adding > /Library/Frameworks/R.framework/Resources/fontconfig/cache > Fontconfig warning: adding ~/.fontconfig > > subsequent commands with X11/cairo plot with no errors. > > If I quit R, and start a new session I continue to receive the Fontconfig > warning. > > Any suggestions on what is wrong with my font configuration? > (mainly annoying :-) > > Thanks! > Merlise > Version: > platform = i386-apple-darwin8.11.1 > arch = i386 > os = darwin8.11.1 > system = i386, darwin8.11.1 > status = > major = 2 > minor = 8.1 > year = 2008 > month = 12 > day = 22 > svn rev = 47281 > language = R > version.string = R version 2.8.1 (2008-12-22) > > > -- > View this message in context: > http://www.nabble.com/Fontconfig-warning-with-X11%28%29-on-MAC-OS-X-10.4-tp22205067p22205067.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 > -- Roger D. Peng | http://www.biostat.jhsph.edu/~rpeng/ __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Fontconfig warning with X11() on MAC OS X 10.4
On Feb 25, 2009, at 10:27 , MerliseClyde wrote: I posted previously about problems with X11() on my MAC using R 2.8.1 . After installing the securilty update for Tiger this morning, X11() now works from an xterm :-) However, I receive the following warnings with any plotting command using the default X11 settings. Fontconfig warning: no elements found. Check configuration. Fontconfig warning: adding /Library/Frameworks/R.framework/Resources/fontconfig/ cache Fontconfig warning: adding ~/.fontconfig Try re-installing R from the CRAN binary -- apparently your FC configuration was somehow blown away (strangely since it resides within R.framework). Cheers, S PS: This is a sort of question you should send to R-SIG-Mac, really ... Everything works fine with the Xlib option: X11(type="Xlib") plot(1:10) # no problems! X11(type="cairo") plot(1:10) Fontconfig warning: no elements found. Check configuration. Fontconfig warning: adding /Library/Frameworks/R.framework/Resources/fontconfig/ cache Fontconfig warning: adding ~/.fontconfig subsequent commands with X11/cairo plot with no errors. If I quit R, and start a new session I continue to receive the Fontconfig warning. Any suggestions on what is wrong with my font configuration? (mainly annoying :-) Thanks! Merlise Version: platform = i386-apple-darwin8.11.1 arch = i386 os = darwin8.11.1 system = i386, darwin8.11.1 status = major = 2 minor = 8.1 year = 2008 month = 12 day = 22 svn rev = 47281 language = R version.string = R version 2.8.1 (2008-12-22) -- View this message in context: http://www.nabble.com/Fontconfig-warning-with-X11%28%29-on-MAC-OS-X-10.4-tp22205067p22205067.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 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Fontconfig warning with X11() on MAC OS X 10.4
Thanks -- Quartz works perfectly fine under R in an xterm, so do the graphics functions in the Cairo package. I usually run R from emacs under X11 on both my MAC and linux box, so just use to the "default" graphics device opening with no problems after issuing a graphics command rather than having to take the extra step to open the device then issue the plot command. BTW, I have no problem on another MacBook running Leopard. best, Merlise On Wed, 4 Mar 2009, Roger Peng wrote: I realize this doesn't directly answer your question, but seeing as you're on a Mac, have you tried using the quartz device? -roger On Wed, Feb 25, 2009 at 10:27 AM, MerliseClyde wrote: I posted previously about problems with X11() on my MAC using R 2.8.1 . After installing the securilty update for Tiger this morning, X11() now works from an xterm :-) However, I receive the following warnings with any plotting command using the default X11 settings. Fontconfig warning: no elements found. Check configuration. Fontconfig warning: adding /Library/Frameworks/R.framework/Resources/fontconfig/cache Fontconfig warning: adding ~/.fontconfig Everything works fine with the Xlib option: X11(type="Xlib") plot(1:10) # no problems! X11(type="cairo") plot(1:10) Fontconfig warning: no elements found. Check configuration. Fontconfig warning: adding /Library/Frameworks/R.framework/Resources/fontconfig/cache Fontconfig warning: adding ~/.fontconfig subsequent commands with X11/cairo plot with no errors. If I quit R, and start a new session I continue to receive the Fontconfig warning. Any suggestions on what is wrong with my font configuration? (mainly annoying :-) Thanks! Merlise Version: platform = i386-apple-darwin8.11.1 arch = i386 os = darwin8.11.1 system = i386, darwin8.11.1 status = major = 2 minor = 8.1 year = 2008 month = 12 day = 22 svn rev = 47281 language = R version.string = R version 2.8.1 (2008-12-22) -- View this message in context: http://www.nabble.com/Fontconfig-warning-with-X11%28%29-on-MAC-OS-X-10.4-tp22205067p22205067.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 -- __ || | Merlise Clyde, Associate Professor| | Department of Statistical Science | | 223E Old Chemistry, BOX 90251 | | Duke University| | Durham, NC 27708-0251 | || | Office Phone: (919) 681-8440 | | Fax: (919) 684-8594 | | email:cl...@stat.duke.edu | | web: http://www.stat.duke.edu/~clyde | ||__ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] "names<-" doesn't raise an error
Hi, When a method is not defined for an object, you expect to get an error. But this is not the case for "names<-". You can use "names<-" on any S4 object: it will remain silent, giving you the impression that it actually did something: setClass("A", representation(vals="numeric")) setMethod("names", "A", function(x) names(x...@vals)) > vals <- 8:2 > names(vals) <- letters[1:7] > a <- new("A", vals=vals) > names(a) [1] "a" "b" "c" "d" "e" "f" "g" > names(a) <- LETTERS[1:7] # no error > names(a) [1] "a" "b" "c" "d" "e" "f" "g"# nothing has changed Shouldn't "names<-" return an error like "[" or "[<-" do in such situation? > a[2] Error in a[2] : object of type 'S4' is not subsettable > a[2] <- 55 Error in a[2] <- 55 : object of type 'S4' is not subsettable That would make it more convenient to implement classes where instances have immutable names. For now I need to use the following workaround: setReplaceMethod("names", "A", function(x, value) stop("cannot set my names")) > names(a) <- LETTERS[1:7] Error in `names<-`(`*tmp*`, value = c("A", "B", "C", "D", "E", "F", "G" : cannot set my names but that shouldn't be necessary. Thanks! H. __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] methods package
I'm working on the next version of coxme, one step of which is converting the bdsmatrix library from Splus to R. Actually, it is a conversion from S4 methods as first described in the Green book to S4 methods as they currently exist. Mostly it's going ok, but not entirely. 1. The biggest issue is lack of documentation. The online help pages have not been a help; they keep saying it's "as found in the green book - almost". I've looked for the package on CRAN in the hopes for more there, but can't find it. Perchance there is something obvious that I am missing? 2. The changes are small but numerous. The current one that has me puzzled is a method for addition: setMethod(Ops, signature=c('numeric', 'bdsmatrix'), Let xmat be ordinary and bmat be a bdsmatrix. In the old code "xmat + bmat" fell to this method (which knows what to do), in the current R I get failure due to no method found. is.numeric(xmat) is TRUE. What is the fix? 3. In the green book the examples used .Dim and .Dimnames slots, the Matrix library uses Dim and Dimnames. Is there a good reason to choose one or the other? I'll be out of town for the next few days (son's wedding) so instant response is not necessary. Terry Therneau __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Two documentation questions
1. I often like to put bits of the output into the manual pages. (We can have a discussion of the value of this elsewhere -- I think it is sometimes a good thing.) In R I need to surround these with \dontrun{} for the sake of the tester, which is fine. But the printed output contains ## Not run and ## End (not run) comments, which defeats the purpose of the lines by breaking them off from the their context. How do I turn these off? For printing \dontrun should be a no-op. Or at least I should have the option of making it so -- I'm rather opinionated about the format of things I prepare for teaching purposes. You can assume medium Tex skills in answering; my book is in Latex but I don't create my own formats. 2. In the pdf for the survival package, or at least the one generated by R CMD check, the entries are in a random order. Can I fix this? It makes reading the document to look for errors rather challenging. (That is, when I'm looking at a particular Rd file, and want to see what it turned out to be.) Terry Therneau __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Two documentation questions
Perhaps you could just place the output in comments. print(5) # 5 head(BOD, 2) # Time demand # 118.3 # 22 10.3 On Wed, Mar 4, 2009 at 8:38 PM, Terry Therneau wrote: > 1. I often like to put bits of the output into the manual pages. (We can > have a discussion of the value of this elsewhere -- I think it is sometimes > a good thing.) > In R I need to surround these with \dontrun{} for the sake of the tester, > which is fine. But the printed output contains > ## Not run > and > ## End (not run) > > comments, which defeats the purpose of the lines by breaking them off from > the their context. How do I turn these off? For printing \dontrun should > be a no-op. Or at least I should have the option of making it so -- I'm > rather > opinionated about the format of things I prepare for teaching purposes. > You can assume medium Tex skills in answering; my book is in Latex but I > don't create my own formats. > > 2. In the pdf for the survival package, or at least the one generated by R CMD > check, the entries are in a random order. Can I fix this? It makes reading > the document to look for errors rather challenging. (That is, when I'm > looking at a particular Rd file, and want to see what it turned out to be.) > > Terry Therneau > > __ > 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
[Rd] patch for axis.POSIXct (related to timezones)
I am finding that axis.POSIXct uses the local timezone for deciding where to put tic marks, even if the data being plotted are in another time zone. The solution is to use attr() to copy from the 'x' (provided as an argument) to the 'z' (used for the 'at' locations). I have pasted my proposed solution in section 1 below (as a diff). Then, in section 2, I'll put some test code that I wrote, when I was figuring this out. I am not entirely sure whether it's OK, or helpful, to post a diff here. I don't understand the R development model well enough to know how to suggest changes, and ?axis.POSIXct does not list an author, so that's why I'm posting here. (All of this matters because I am sharing code with people working in different timezones; I want the timezone of the data to carry over to the graph.) Section 1: patch to axis.POSIXct (Note that the line numbers may be wrong; I'm not working with the source for axis.POSIXct, but rather with the output from a listing of the function in the terminal). ~$ diff -Naur axis.POSIXct.R my.axis.POSIXct.R --- axis.POSIXct.R 2009-03-04 16:22:18.0 -0400 +++ my.axis.POSIXct.R 2009-03-04 16:22:56.0 -0400 @@ -1,4 +1,4 @@ -axis.POSIXct <- function (side, x, at, format, labels = TRUE, ...) +my.axis.POSIXct <- function (side, x, at, format, labels = TRUE, ...) { mat <- missing(at) || is.null(at) if (!mat) @@ -9,6 +9,7 @@ else 3:4] d <- range[2] - range[1] z <- c(range, x[is.finite(x)]) +attr(z, "tzone") <- attr(x, "tzone") if (d < 1.1 * 60) { sc <- 1 if (missing(format)) @@ -41,6 +42,7 @@ zz <- pretty(z/sc) z <- zz * sc class(z) <- c("POSIXt", "POSIXct") +attr(z, "tzone") <- attr(x, "tzone") if (sc == 60 * 60 * 24) z <- as.POSIXct(round(z, "days")) if (missing(format)) @@ -48,6 +50,7 @@ } else if (d < 1.1 * 60 * 60 * 24 * 365) { class(z) <- c("POSIXt", "POSIXct") +attr(z, "tzone") <- attr(x, "tzone") zz <- as.POSIXlt(z) zz$mday <- zz$wday <- zz$yday <- 1 zz$isdst <- -1 @@ -65,6 +68,7 @@ } else { class(z) <- c("POSIXt", "POSIXct") +attr(z, "tzone") <- attr(x, "tzone") zz <- as.POSIXlt(z) zz$mday <- zz$wday <- zz$yday <- 1 zz$isdst <- -1 ~$ Section 2. Test code = # fake some data, and draw a vertical line at midnight ... note how # the latter will be in the wrong place (unless the computer is set to UTC). tc <- c("2008-06-28 15:50:00 UTC","2008-06-28 20:50:00 UTC","2008-06-29 01:50:00 UTC", "2008-06-29 06:50:00 UTC","2008-06-29 11:50:00 UTC","2008-06-29 16:50:00 UTC", "2008-06-29 21:50:00 UTC","2008-06-30 02:50:00 UTC","2008-06-30 07:50:00 UTC", "2008-06-30 12:50:00 UTC") t <- as.POSIXct(tc, tz="UTC") # note using UTC p <- c(2.4998, 0.4687, 2.7120, 2.0676, 0.5614, 2.6121, 0.5161, 2.9572, 2.2567, 0.3820) t0 <- as.POSIXct("2008-06-29 00:00:00", tz="UTC") par(mfrow=c(2,1)) plot(t, p, type='l') abline(v=t0, col='red') plot(t, p, type='l', axes=FALSE) box() axis(2) source("~/my.axis.POSIXct.R") my.axis.POSIXct(side=1, x=t) abline(v=t0, col='red') -- View this message in context: http://www.nabble.com/patch-for-axis.POSIXct-%28related-to-timezones%29-tp22338700p22338700.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] bug (PR#13570)
<> This is a CRITICAL bug!!! I have verified it in R 2.8.1 for mac and for windows. The problem is with loess degree=0 smoothing. For example, try the following: x <- 1:100 y <- rnorm(100) plot(x, y) lines(predict(loess(y ~ x, degree=0, span=0.5))) This is obviously wrong. R 2.8 --please do not edit the information below-- Version: platform = i386-apple-darwin8.11.1 arch = i386 os = darwin8.11.1 system = i386, darwin8.11.1 status = major = 2 minor = 8.1 year = 2008 month = 12 day = 22 svn rev = 47281 language = R version.string = R version 2.8.1 (2008-12-22) GUI: R-GUI 1.27 (5301) Locale: en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8 Search Path: .GlobalEnv, tools:RGUI, package:stats, package:graphics, package:grDevices, package:utils, package:datasets, package:Rutils, package:methods, Autoloads, package:base __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] problems with nls?
I need to make nonlinear regression with the posterior script, but how is the problem? I have error in library (nls), package 'nls' has been merged into 'stats'. I need help? What other forms I have to make nonlinear regression? and how I find to calculate statistics y residuals, scatterplot. thanks SCRIPT ros<-read.table("Dataset.csv",header=T,sep=",") ros attach(ros) # preliminaries options(width=44) options(digits=3) ## Nonlinear Regression par(mfrow=c(1,2)) attach(ros) plot(U1.7km, R, main="(a)") library(nls) mod1<-nls(R ~ beta1*(U1.7km^beta2)+(Hm^beta3)),start=list(beta1=2.031,beta2=0.800,beta3=-0.255), trace = TRUE) summary(mod1) coef(mod1) coef(summary(mod1)) lines(R, fitted.values(mod1), lwd=2) plot(R, residuals(mod1), type="b", main="(b)") abline(h=0, lty=2) -- View this message in context: http://www.nabble.com/problems-with-nls--tp22345292p22345292.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
Re: [Rd] patch for axis.POSIXct (related to timezones)
This is the appropriate forum, and thank you for the comments. At a quick look it might be simpler to use the 'tz' argument to as.POSIXlt, but I'll look in more detail and commit a change later today. On Wed, 4 Mar 2009, Dan Kelley wrote: I am finding that axis.POSIXct uses the local timezone for deciding where to put tic marks, even if the data being plotted are in another time zone. The solution is to use attr() to copy from the 'x' (provided as an argument) to the 'z' (used for the 'at' locations). I have pasted my proposed solution in section 1 below (as a diff). Then, in section 2, I'll put some test code that I wrote, when I was figuring this out. I am not entirely sure whether it's OK, or helpful, to post a diff here. I don't understand the R development model well enough to know how to suggest changes, and ?axis.POSIXct does not list an author, so that's why I'm posting here. (All of this matters because I am sharing code with people working in different timezones; I want the timezone of the data to carry over to the graph.) Section 1: patch to axis.POSIXct (Note that the line numbers may be wrong; I'm not working with the source for axis.POSIXct, but rather with the output from a listing of the function in the terminal). ~$ diff -Naur axis.POSIXct.R my.axis.POSIXct.R --- axis.POSIXct.R 2009-03-04 16:22:18.0 -0400 +++ my.axis.POSIXct.R 2009-03-04 16:22:56.0 -0400 @@ -1,4 +1,4 @@ -axis.POSIXct <- function (side, x, at, format, labels = TRUE, ...) +my.axis.POSIXct <- function (side, x, at, format, labels = TRUE, ...) { mat <- missing(at) || is.null(at) if (!mat) @@ -9,6 +9,7 @@ else 3:4] d <- range[2] - range[1] z <- c(range, x[is.finite(x)]) +attr(z, "tzone") <- attr(x, "tzone") if (d < 1.1 * 60) { sc <- 1 if (missing(format)) @@ -41,6 +42,7 @@ zz <- pretty(z/sc) z <- zz * sc class(z) <- c("POSIXt", "POSIXct") +attr(z, "tzone") <- attr(x, "tzone") if (sc == 60 * 60 * 24) z <- as.POSIXct(round(z, "days")) if (missing(format)) @@ -48,6 +50,7 @@ } else if (d < 1.1 * 60 * 60 * 24 * 365) { class(z) <- c("POSIXt", "POSIXct") +attr(z, "tzone") <- attr(x, "tzone") zz <- as.POSIXlt(z) zz$mday <- zz$wday <- zz$yday <- 1 zz$isdst <- -1 @@ -65,6 +68,7 @@ } else { class(z) <- c("POSIXt", "POSIXct") +attr(z, "tzone") <- attr(x, "tzone") zz <- as.POSIXlt(z) zz$mday <- zz$wday <- zz$yday <- 1 zz$isdst <- -1 ~$ Section 2. Test code = # fake some data, and draw a vertical line at midnight ... note how # the latter will be in the wrong place (unless the computer is set to UTC). tc <- c("2008-06-28 15:50:00 UTC","2008-06-28 20:50:00 UTC","2008-06-29 01:50:00 UTC", "2008-06-29 06:50:00 UTC","2008-06-29 11:50:00 UTC","2008-06-29 16:50:00 UTC", "2008-06-29 21:50:00 UTC","2008-06-30 02:50:00 UTC","2008-06-30 07:50:00 UTC", "2008-06-30 12:50:00 UTC") t <- as.POSIXct(tc, tz="UTC") # note using UTC p <- c(2.4998, 0.4687, 2.7120, 2.0676, 0.5614, 2.6121, 0.5161, 2.9572, 2.2567, 0.3820) t0 <- as.POSIXct("2008-06-29 00:00:00", tz="UTC") par(mfrow=c(2,1)) plot(t, p, type='l') abline(v=t0, col='red') plot(t, p, type='l', axes=FALSE) box() axis(2) source("~/my.axis.POSIXct.R") my.axis.POSIXct(side=1, x=t) abline(v=t0, col='red') -- View this message in context: http://www.nabble.com/patch-for-axis.POSIXct-%28related-to-timezones%29-tp22338700p22338700.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 -- 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