[R] inconsistent behavior of summary function

Daniel Malter daniel at umd.edu
Tue Oct 4 08:58:42 CEST 2011


I have not read the manual, but I drew 10000 random normal vectors and 10000
random Poisson vectors of length 10000 and was unable to reproduce this
behavior. Can you provide an example (self-contained code) that reproduces
this problem?

Thanks,
Daniel


Jeanne M. Spicer wrote:
> 
> The summary function behaves inconsistently with data frame columns, e.g.
> 
> summary(rock)           #max of area 12212, correct
> summary(rock$area)  #max of area 12210, incorrect max
> 
> I know that  
> summary(rock$area, digits=5)  
> will correct the error (I DID read the manual). But my point is the
> inconsistency, because I get the correct answer without having to add the
> digits option in the first statement when referring to the full dataframe.
> This is one of the first functions that beginners use and if they have to
> RTM and tinker with options before they can get a consistent value for the
> max of an integer column, it is off-putting to say the least. At worst it
> confirms the skeptic's suspicion that open-source software is a bit flaky. 
> Would it be out of line to report this to r-bugs -- at least to improve on
> the documentation?  
> 
> -jms
> r2.13.1 maclion
> 
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help@ 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://r.789695.n4.nabble.com/inconsistent-behavior-of-summary-function-tp3869906p3870106.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list