ropensci/skimr
Numbers that should be zero are displayed in scientific notation
Offen
#479 geöffnet am 21.07.2019
help wanted
Repository-Metriken
- Stars
- (1.061 Sterne)
- PR-Merge-Metriken
- (Keine gemergten PRs in 30 T)
Beschreibung
This may be an issue with R as opposed to skimr, but it always bothers me. I'd appreciate help if you have any. Basically, numbers that should be essentially zero are displayed in scientific notation. Is there some way to avoid this other than the round() function? Here is an example:
library(tibble)
library(dplyr)
library(skimr)
t <- tibble::tibble(
x = c(7.250, 71.283, 7.925, 53.100, 8.050, 8.458, 51.862, 21.075, 11.133, 30.071)
)
t <- dplyr::mutate(t,
x_c = x - mean(x),
x_z = x_c / sd(x)
)
skim(t)
#> Skim summary statistics
#> n obs: 10
#> n variables: 3
#>
#> -- Variable type:numeric -------------------------------------------------------
#> variable missing complete n mean sd p0 p25 p50 p75 p100 hist
#> x 0 10 10 27.02 23.6 7.25 8.15 16.1 46.41 71.28 ▇▂▂▁▁▃▁▂
#> x_c 0 10 10 -8.9e-16 23.6 -19.77 -18.87 -10.92 19.39 44.26 ▇▂▂▁▁▃▁▂
#> x_z 0 10 10 -3.3e-17 1 -0.84 -0.8 -0.46 0.82 1.88 ▇▂▂▁▁▃▁▂