Comments (9)
I think we should consider this the default for large numbers
from pillar.
this package is clearly going in the right direction!! :)
from pillar.
This is now implemented, at most 13 decimal places (including the dot) are printed.
library(tibble)
tibble(x = 1e12)
#> # A tibble: 1 x 1
#> x
#> <dbl>
#> 1 1000000000000
tibble(x = 1e13)
#> # A tibble: 1 x 1
#> x
#> <dbl>
#> 1 1.00e13
tibble(x = 1e-10)
#> # A tibble: 1 x 1
#> x
#> <dbl>
#> 1 0.0000000001
tibble(x = 1e-11)
#> # A tibble: 1 x 1
#> x
#> <dbl>
#> 1 1.00e-11
Created on 2019-05-03 by the reprex package (v0.2.1)
from pillar.
The exponents aren't divisible by three in your examples
from pillar.
Right, I was confused.
from pillar.
sorry why would they need to be divisible by three?!
from pillar.
That's what makes engineering notation different from scientific notation.
from pillar.
Would you like to test-drive num()
, available in pillar 1.5.1.9002, to be released as pillar 1.6.0? After release, I'll reexport this the constructor from tibble too. See https://pillar.r-lib.org/dev/articles/numbers.html for a documentation stub.
library(pillar)
library(tibble)
x <- c(543123578890.23, 240234.131, 40234.1)
col_a <- num(x, notation = "eng")
col_a
#> <tibble_num(eng)[3]>
#> [1] 543.00e9 240.00e3 40.20e3
tibble::tibble(x, col_a)
#> # A tibble: 3 x 2
#> x col_a
#> <dbl> <eng>
#> 1 543123578890. 543.00e9
#> 2 240234. 240.00e3
#> 3 40234. 40.20e3
Created on 2021-04-03 by the reprex package (v1.0.0)
The scientific display is still a bit off, working on it.
from pillar.
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue and link to this old issue if necessary.
from pillar.
Related Issues (20)
- Should `*` or `i` be used for footer information? HOT 11
- Truncated list-cols don't seem to get grey coloring HOT 2
- pillar_num and logical vectors cause (potential?) issues
- Installation of pillar 1.9.0 in GitHub actions fails HOT 2
- Should time zones be changing datetime formatting?
- Conditional colouring of values in specific columns HOT 2
- Infinite date-time being printed twice
- Why do `new_pillar_shaft()` and `new_pillar_shaft_simple()` default `min_width` to `width`? HOT 1
- FR: don't print seconds in dttm if there is not enough space
- FR: Add a pillar.max_chars option HOT 1
- Modify tbl_df subclass print in a package HOT 2
- Feature request: Option to print both head and tail of tables? HOT 6
- Use pillar to make column titles red HOT 1
- Guidance colorizing values within a column HOT 2
- The output of `glimpse()` is too wide in RStudio Visual Editor mode HOT 6
- Show colour in `glimpse()` HOT 2
- pillar::num type vector is not properly treated by base::sum (with respect to na.rm=TRUE) HOT 1
- Some changes make warnings in tibble
- Please add col number to glimpse output HOT 1
- logic of pillar.print_max pillar.print_min
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pillar.