[Rd] Help with issues for update when defining S3 methods for lm
Dear expeRts, in my package DoE.base, I have defined a generic for lm (lm <- function(formula, ...){UseMethod("lm")}) and functions lm.design and lm.default (lm.default <- stats::lm). The namespace exports "lm", and defines the methods with S3method (e.g. S3method("lm",default)). This construction causes a problem with update, as e.g. in swiss.lm <- lm(Fertility~Education+Examination, swiss) upd.swiss.lm <- update(swiss.lm, .~.-Examination) which works without DoE.base loaded, but not with DoE.base loaded. In the latter case, I get Error in eval(expr, envir, enclos) : could not find function "lm.default" I thought I exactly followed the directions in Section 1.6.2 of "Writing R extensions". Any suggestions ? Regards, Ulrike -- View this message in context: http://old.nabble.com/Help-with-issues-for-update-when-defining-S3-methods-for-lm-tp26156624p26156624.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] Request: bring back windows chm help support (PR#14034)
Peter Ehlers wrote: Duncan Murdoch wrote: On 31/10/2009 6:05 PM, alex...@4dscape.com wrote: Full_Name: alex galanos Version: 2.10.0 OS: windows vista Submission from: (NULL) (86.11.78.110) I respectfully request that the chm help support for windows, which was very convenient, be reinstated...couldn't an online poll have been conducted to gauge the support of this format by window's users? First, I don't think that complaints are bugs. Secondly, why not give the new format a chance. Personally, I like it. Thanks, Duncan. -Peter Ehlers It was not a complaint but a simple request, which given the presence of a wishlist subdirectory I thought was appropriate to post. Apologies if it came across as such. -Alexios Ghalanos I don't think it's going to come back, because nobody who knows how to bring it back wants to take on the work of maintaining it. However, what you might want to do is to contact one of the commercial providers of R, and ask them to reinstate it. They're much more interested in market research than R Core is, because their customers pay them for their product. They'd probably be happy to sell you an enhanced R supporting CHM help if they think there's a market for it. Duncan Murdoch __ 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] Request: bring back windows chm help support (PR#14034)
Duncan Murdoch wrote: On 01/11/2009 5:47 PM, alexios wrote: Peter Ehlers wrote: Duncan Murdoch wrote: On 31/10/2009 6:05 PM, alex...@4dscape.com wrote: Full_Name: alex galanos Version: 2.10.0 OS: windows vista Submission from: (NULL) (86.11.78.110) I respectfully request that the chm help support for windows, which was very convenient, be reinstated...couldn't an online poll have been conducted to gauge the support of this format by window's users? First, I don't think that complaints are bugs. Secondly, why not give the new format a chance. Personally, I like it. Thanks, Duncan. -Peter Ehlers It was not a complaint but a simple request, which given the presence of a wishlist subdirectory I thought was appropriate to post. Apologies if it came across as such. What is it that you particularly liked about the CHM help? One thing it did well was the table of contents at the side, and the built-in search. I would like to get those back, in the HTML help. Is there anything else? Duncan Murdoch Nothing else really, the table of contents and search facility were the biggest advantages. Thanks. Alexios Ghalanos __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] two small wishes (with code sugegstions) for R-core
Dear R developers, It would be great if you could implement the two minor code changes suggested below, which would help processing large objects in R. Jens Oehlschlägel # Wish no. 1: let [.AsIs return the class AFTER subsetting, not the class of the original object # Wish no. 2: adjust write.csv and write.csv2 for multiple calls in chunked writing # Rationale no. 1: a couple of packages will return a different class than SomeClass when subsetting with [.SomeClass # and still need to keep the AsIs property # Examples for classes returning different classes on subscipting are in packages 'bit', 'ff', 'bigmemory' # For classes where [.SomeClass will return class SomeClass, such a change will not hurt # Code suggestion no. 1: please use "[.AsIs" <- function (x, i, ...){ ret <- NextMethod("[") oldClass(ret) <- c("AsIs", oldClass(ret)) ret } # instead of "[.AsIs" <- function (x, i, ...) structure(NextMethod("["), class = class(x)) # Rationale no. 2: write.csv and write.csv2 currently enforce that a header must be written, even with append=TRUE # This prevents a csv file being written in chunks. # If argument append=TRUE is used, a header should not be enforced (may be even be forbidden) # Code suggestion no. 2: please use write.csv <- function (...) { Call <- match.call(write.table, expand.dots = TRUE) for (argname in c("col.names", "sep", "dec", "qmethod")) if (!is.null(Call[[argname]])) warning(gettextf("attempt to set '%s' ignored", argname), domain = NA) rn <- eval.parent(Call$row.names) ap <- eval.parent(Call$append) Call$col.names <- if (is.logical(ap) && ap) FALSE else {if (is.logical(rn) && !rn) TRUE else NA} Call$sep <- "," Call$dec <- "." Call$qmethod <- "double" Call[[1L]] <- as.name("write.table") eval.parent(Call) } write.csv2 <- function (...) { Call <- match.call(write.table, expand.dots = TRUE) for (argname in c("col.names", "sep", "dec", "qmethod")) if (!is.null(Call[[argname]])) warning(gettextf("attempt to set '%s' ignored", argname), domain = NA) rn <- eval.parent(Call$row.names) ap <- eval.parent(Call$append) Call$col.names <- if (is.logical(ap) && ap) FALSE else {if (is.logical(rn) && !rn) TRUE else NA} Call$sep <- ";" Call$dec <- "," Call$qmethod <- "double" Call[[1L]] <- as.name("write.table") eval.parent(Call) } # instead of write.csv <- function (...) { Call <- match.call(expand.dots = TRUE) for (argname in c("col.names", "sep", "dec", "qmethod")) if (!is.null(Call[[argname]])) warning(gettextf("attempt to set '%s' ignored", argname), domain = NA) rn <- eval.parent(Call$row.names) Call$col.names <- if (is.logical(rn) && !rn) TRUE else NA Call$sep <- "," Call$dec <- "." Call$qmethod <- "double" Call[[1L]] <- as.name("write.table") eval.parent(Call) } write.csv2 <- function (...) { Call <- match.call(expand.dots = TRUE) for (argname in c("col.names", "sep", "dec", "qmethod")) if (!is.null(Call[[argname]])) warning(gettextf("attempt to set '%s' ignored", argname), domain = NA) rn <- eval.parent(Call$row.names) Call$col.names <- if (is.logical(rn) && !rn) TRUE else NA Call$sep <- ";" Call$dec <- "," Call$qmethod <- "double" Call[[1L]] <- as.name("write.table") eval.parent(Call) } __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Request: bring back windows chm help support (PR#14034)
Dear Alexios and Duncan, I think that there's one more thing to be said in favour of chm help, and that's that its format is familiar to Windows users. I've been using html help on Windows myself for a long time, but before R 2.10.0 recommended chm help to new Windows users of R. That said, I expect that retaining chm help just isn't worth the effort. Regards, John > -Original Message- > From: r-devel-boun...@r-project.org [mailto:r-devel-boun...@r-project.org] On > Behalf Of alexios > Sent: November-01-09 6:05 PM > To: Duncan Murdoch > Cc: r-de...@stat.math.ethz.ch > Subject: Re: [Rd] Request: bring back windows chm help support (PR#14034) > > Duncan Murdoch wrote: > > On 01/11/2009 5:47 PM, alexios wrote: > >> Peter Ehlers wrote: > >>> Duncan Murdoch wrote: > On 31/10/2009 6:05 PM, alex...@4dscape.com wrote: > > Full_Name: alex galanos > > Version: 2.10.0 > > OS: windows vista > > Submission from: (NULL) (86.11.78.110) > > > > > > I respectfully request that the chm help support for windows, which > > was very > > convenient, be reinstated...couldn't an online poll have been > > conducted to gauge > > the support of this format by window's users? > >>> First, I don't think that complaints are bugs. > >>> Secondly, why not give the new format a chance. Personally, I > >>> like it. Thanks, Duncan. > >>> > >>> -Peter Ehlers > >>> > >> It was not a complaint but a simple request, which given the presence > >> of a wishlist subdirectory I thought was appropriate to post. > >> Apologies if it came across as such. > > > > What is it that you particularly liked about the CHM help? One thing it > > did well was the table of contents at the side, and the built-in search. > > I would like to get those back, in the HTML help. Is there anything else? > > > > Duncan Murdoch > > > > > Nothing else really, the table of contents and search facility were the > biggest advantages. Thanks. > > Alexios Ghalanos > > __ > 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] Request: bring back windows chm help support (PR#14034)
On Mon, Nov 2, 2009 at 9:53 AM, John Fox wrote: > I think that there's one more thing to be said in favour of chm help, and > that's that its format is familiar to Windows users. I've been using html > help on Windows myself for a long time, but before R 2.10.0 recommended chm > help to new Windows users of R. That said, I expect that retaining chm help > just isn't worth the effort. > Another point is that even Microsoft itself is moving from chm to another format. See: http://en.wikipedia.org/wiki/Microsoft_Compiled_HTML_Help http://en.wikipedia.org/wiki/Microsoft_Assistance_Markup_Language __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] R292 and tcl/tk
BACKGROUND R2.9.2 built on power5 aix5.3 using gcc 4.2.4 (also installed: tcl and tk 8.5.7) Access from a Windows XP machine using Exceed v9.0, aixterm (DISPLAY etc. setup) export LDFLAGS="-L/usr/lib64 -L/opt/freeware/lib64 -L/opt/freeware/64/lib -L/usr/X11R6/lib -L/opt/freeware/lib" export CPPFLAGS="-I/opt/freeware/include -I/usr/lpp/X11/include/X11" CONFIGURATION 1 (with tcl/tk) ../R-2.9.2/configure --enable-R-shlib --enable-BLAS-shlib --with-tcl-config=/opt/freeware/lib64/tclConfig.sh --with-tk-config=/opt/freeware/lib64/tkConfig.sh --prefix=/usr/local/R-2.9.2 > config_292.log 2>&1 > update.packages() --- Please select a CRAN mirror for use in this session --- Loading Tcl/Tk interface ... *** caught segfault *** address 21188073e, cause 'memory not mapped' Traceback: 1: .C("tcltk_init", PACKAGE = "tcltk") 2: fun(...) 3: doTryCatch(return(expr), name, parentenv, handler) ... 19: tryCatch(asNamespace(pkg), hasNoNamespaceError = function(e) NULL) 20: tcltk::tk_select.list 21: menu(m[, 1L], graphics, "CRAN mirror") 22: chooseCRANmirror() 23: contrib.url(repos, type) 24: available.packages(contriburl = contriburl, method = method) 25: update.packages() CONFIGURATION 2 (without tcl/tk) ../R-2.9.2/configure --enable-R-shlib --enable-BLAS-shlib --with-tcltk=no --prefix=/usr/local/R-2.9.2 > config_292.log 2>&1 ; make > make_292.log 2>&1 > update.packages() --- Please select a CRAN mirror for use in this session --- CRAN mirror 1: Argentina (Buenos Aires)2: Australia 3: Austria 4: Belarus 5: Belgium 6: Brazil (PR) QUESTION 1. Are there any known issues with tcl/tk? Should I be doing anything different in the configuration? 2. When I try a simple plot command in either configuration (eg. plot(sin, -pi, pi)), the plot window shows up immediately on my machine but the plot itself takes all of two minutes to draw. I am not sure if the two issues are related. I would appreciate any help with this. Thanks. __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] odd evaluation within correlation argument of glmmPQL
Ben Bolker ufl.edu> writes: > > [snip example and patches] > The basic issue is that glmmPQL throws out data that are > not involved in the fixed or random model terms, or in the offset > term. It doesn't save variables that are only found in the > correlation formula argument. It's hard to imagine how > this behavior is anything other than a bug ... and the patch fixes it > in a straightforward way. > Bumping again (sorry to nag, but it would seem a shame for this to slip through the cracks). Should I submit this as a bug? Ben Bolker __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel