I have a vector 10,000 numbers long with a skewed distribution and extreme values. When I call base R's summary() function, certain values display as 0 when they are not actually 0.
From my actual data:
> summary(vec)
Min. 1st Qu. Median Mean 3rd Qu. Max.
0.000e+00 0.000e+00 0.000e+00 1.244e+16 0.000e+00 1.225e+20
> str(summary(vec))
'summaryDefault' Named num [1:6] 3.69e-207 1.73e-01 2.84e-01 1.24e+16 4.52e-01 ...
- attr(*, "names")= chr [1:6] "Min." "1st Qu." "Median" "Mean" ...
I am expecting the summary function to show the actual values that it has stored. Like this:
Min. 1st Qu. Median Mean 3rd Qu. Max.
3.69e-207 1.73e-01 2.84e-01 1.244e+16 4.52e-01 1.225e+20
Here is a reproducible example (only the min shows incorrectly as 0):
> x = seq(from=3.69e-207, to=1.23e+20, length.out=10000)
> summary(x)
Min. 1st Qu. Median Mean 3rd Qu. Max.
0.000e+00 3.075e+19 6.150e+19 6.150e+19 9.225e+19 1.230e+20
> str(summary(x))
'summaryDefault' Named num [1:6] 3.69e-207 3.08e+19 6.15e+19 6.15e+19 9.22e+19 ...
- attr(*, "names")= chr [1:6] "Min." "1st Qu." "Median" "Mean" ...
> summary(x)["Min."]
Min.
3.69e-207
options(digits=3); piwill show3.14on the console, butpiis clearly not exactly that number, andpi > 3.14will returnTRUE. With your values, you can verify this withsummary(vec) > 0, seeing that all are (should be) true, greater than 0.