[R] Setting Number of Displayed Digits

R. Michael Weylandt michael.weylandt at gmail.com
Wed Aug 8 00:43:49 CEST 2012


Can you provide a reproducible example: see, e.g., this site for how to do so:


http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example

Incidentally, I don't believe I can replicate your problem:

> x <- data.frame(conc = sample(c(100, 1,2,3, 0.005, 0.0005, 0.00002), 250, TRUE))
> summary(x)
      conc
 Min.   :  0.00002
 1st Qu.:  0.00050
 Median :  1.00000
 Mean   : 14.88871
 3rd Qu.:  3.00000
 Max.   :100.00000

But perhaps you should set

options(digits = 10)

or so

Michael

On Tue, Aug 7, 2012 at 4:30 PM, Rich Shepard <rshepard at appl-ecosys.com> wrote:
>   Some chemicals have concentrations at or below the method detection limit
> (MDL; 'less-thans') of 0.005 mg/L. When I look at the data frame that is how
> the concentration is displayed. But, when I ask for a summary() of that data
> frame column only 0 is displayed.
>
>   How can I adjust the number of digits displayed by functions such as
> summary()?
>
> Rich
>
> ______________________________________________
> R-help at r-project.org 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.



More information about the R-help mailing list