Create integers by default if all values are integer-valued
Open
theme-base
- Dominant language
- Rust
- Stars
- 145
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Description
I am wondering what the reason is why R creates doubles by default even if all values are integer-valued.
``` r
typeof(1)
#> [1] "double"
```
Created on 2023-12-27 with [reprex v2.0.2](https://reprex.tidyverse.org)
One reason I can think of is that doubles are 64 bit, while integers are 32 bit by default, so creating doubles allows for a greater range of values.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.