R-developers,
In version R 2.11.0, weighted.mean was changed such that:
> weighted.mean(NA, na.rm=TRUE)
[1] 0
rather than NaN as in previous versions of R. I see a note in the NEWS
file indicates that weighted.mean was changed "so an infinite value with
zero weight does not force an NaN result."
Thank you, Martin. That worked. And fyi 'export(format)' alone was not
sufficient.
Best,
Dan
On Wed, Jun 23, 2010 at 5:15 AM, Martin Morgan wrote:
> On 06/23/2010 12:16 AM, Daniel Murphy wrote:
> > R-Devel-ers:
> >
> > I have an S4 method that simply formats an object:
> >
> > setGeneric("format
On 06/23/2010 12:16 AM, Daniel Murphy wrote:
> R-Devel-ers:
>
> I have an S4 method that simply formats an object:
>
> setGeneric("formatMe", function(x) standardGeneric("formatMe"))
> setMethod("formatMe", "ANY", function(x) format(x))
>
> If I issue the above in an R session, then define an S4
Peter, thanks for your comments. The reason I have taken this issue
to R-devel is from the advice of Kurt Hornik. An update to my package
oro.nifti is being refused by CRAN because it fails on the
_development_ version of R on 32-bit linux. As we have just discussed
(and thanks to Matt's input),
On Wed, Jun 23, 2010 at 7:13 AM, Peter Dalgaard wrote:
> Gustaf Rydevik wrote:
>
>> Oh, I forgot to mention that the workaround of using as.double (or
>> as.numeric) works fine, and I've done that.
>> It's just that it can take quite a while (as in several hours) to
>> figure out that the reason f
Brandon Whitcher wrote:
> I have installed both 32-bit and 64-bit versions of R2.12.0 (2010-06-15
> r52300) on my Ubuntu 10.04 64-bit system.
Please notice that there is NO release of R 2.12.0 until some time
around October. You are using a build from the UNSTABLE development
branch. The stable b
There is not a single definition of
formatMe()
in your message, therefore nothing works for me, not even the very first
version...
Best,
Uwe Ligges
On 23.06.2010 09:16, Daniel Murphy wrote:
R-Devel-ers:
I have an S4 method that simply formats an object:
setGeneric("formatMe", function(x) s
R-Devel-ers:
I have an S4 method that simply formats an object:
setGeneric("formatMe", function(x) standardGeneric("formatMe"))
setMethod("formatMe", "ANY", function(x) format(x))
If I issue the above in an R session, then define an S4 class with its own
format method, I get the desired result: