[R] Does anyone.... worth a warning?!? No warning at all

Mike Meredith mmeredith at wcs.org
Tue Aug 21 04:45:12 CEST 2007


It's always seemed to me that 'mean' behaved as expected, and 'max' et al
were peculiar. If you passed 2 or more vectors to a function would you
really expect it to concatenate them before doing it's proper job? I'd
rather expect it to behave like 'pmax' and compare them element by element.

Maybe 'max' should generate a warning.

Cheers,  Mike



Tom Willems-2 wrote:
> 
> dear Mathew
> 
> mean is a Generic function 
> 
> mean(x...)
> 
> in wich x is a data object, like a  data frame a list a numeric vector...
> 
> so in your example it only reads the first character and then reports it.
> 
> try x = c(1,1,2)
> mean(x)
> 
> kind regards,
> Tom
> 
> 
> Disclaimer: click here
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
> 
> 

-- 
View this message in context: http://www.nabble.com/Re%3A-Does-anyone....-worth-a-warning-%21--No-warning-at-all-tf4297988.html#a12247316
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list