Re: [Rd] Suggestion for exception handling: More informative error message for "no applicable method..." (S3)

2009-10-30 Thread Henrik Bengtsson
Thanks for this silent update, whoever did it: > foo <- function(...) UseMethod("foo") > foo.ClassA <- function(object, ...) { cat("foo() for ClassA called.\n") } > foo(structure(1, class="ClassA")) foo() for ClassA called. > foo(NULL) Error in UseMethod("foo") : no applicable method for 'foo' a

Re: [Rd] parse_Rd and/or lazyload problem

2009-10-30 Thread Mark.Bravington
The errors are generated inside lazyLoadDBfetch; I don't call object.size, so unfortunately that's not the issue (unless o.s. is called somewhere inside the .Primitive for lazyLoadDBfetch). > > I'm encountering problems when making lazy-loadable databases of the output > > from 'parse_Rd'. The

Re: [Rd] parse_Rd and/or lazyload problem

2009-10-30 Thread Duncan Murdoch
On 30/10/2009 12:50 AM, mark.braving...@csiro.au wrote: I'm encountering problems when making lazy-loadable databases of the output from 'parse_Rd'. The lazy-load database is of seemingly limitless size when I try to reload it... Admittedly I am using functions that I'm not really supposed to

Re: [Rd] evince pdf viewing

2009-10-30 Thread Prof Brian Ripley
Yes, it is known: it is described with workarounds (thanks to Marc Schwarz, AFAIR) on the ?pdf help page. On Fri, 30 Oct 2009, Roger Koenker wrote: It was pointed out to me that scatter plots made on our rhel5 system (sessionInfo() below, have the curious feature that when made with pdf() and

Re: [Rd] quoted strings in foo.Rd rendered as â

2009-10-30 Thread Prof Brian Ripley
First step to check: update to a released version of R 2.10.0! If that does not help, using options(useFancyQuotes = TRUE) in the released version should (but possibly not as far back as your alpha pre-release). I suspect that whatever you mean my 'my X11 window' (it is the application runni

[Rd] quoted strings in foo.Rd rendered as â

2009-10-30 Thread Roger Koenker
Another anomaly from our rhel5 system, again sessionInfo() below. When I'm logged in remotely via ssh from my macpro and view documentation files in my X11 window, strings in single quotes in the files are all abbreviated as â . The same files appear fine when rendered in X11 using the local

[Rd] evince pdf viewing

2009-10-30 Thread Roger Koenker
It was pointed out to me that scatter plots made on our rhel5 system (sessionInfo() below, have the curious feature that when made with pdf() and viewed with evince show the points as "q" not "o". Is this a known problem with evince? It is pretty clearly not a problem with R, since if I bri

Re: [Rd] bug in `pmatch' (error with too long 'choices')?

2009-10-30 Thread Tony Plate
I believe the answer is that you are missing something: partial matching. The 651'st elt of colors() is "whitesmoke", so it is ambiguous whether "whit" matches "white" or "whitesmoke". When you leave out the 651'st elt, "whit" happily matches "white". > which(substring(colors(), 1, 4)=="whit"

Re: [Rd] weighted.mean uses zero when na.rm=TRUE (PR#14032)

2009-10-30 Thread Peter Dalgaard
arn...@hafro.is wrote: The weighted.mean() function replaces NA values with 0.0 when the user specifies na.rm=TRUE: x <- c(101, 102, NA) mean(x, na.rm=TRUE) # 101.5, correct weighted.mean(x, na.rm=TRUE)# 67.7, wrong weighted.mean(x, w=c(1,

[Rd] bug in `pmatch' (error with too long 'choices')?

2009-10-30 Thread Joerg van den Hoff
I observed the following: match.arg("white", colors()) yields 'white', but match.arg("whit", colors()) yields: `Error in match.arg("whit", colors()) : 'arg' should be one of "white", "aliceblue", '... this message actually comes from `pmatch'. using a suitable subset of `colors()' works

[Rd] weighted.mean uses zero when na.rm=TRUE (PR#14032)

2009-10-30 Thread arnima
The weighted.mean() function replaces NA values with 0.0 when the user specifies na.rm=TRUE: x <- c(101, 102, NA) mean(x, na.rm=TRUE) # 101.5, correct weighted.mean(x, na.rm=TRUE)# 67.7, wrong weighted.mean(x, w=c(1,1,1), na.rm=TRUE)# 67