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
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
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,
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"
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
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
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
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
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
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
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
11 matches
Mail list logo