Write a tab-separated file, rounding floats
write_tsv.Rd
Write a tab-separated file, rounding floats
Arguments
- object
A
data.table
(or coerceable)- precision
The number of digits after the decimal point to display (default: 8)
- sep
Delimiter (default
\t
)- ...
Additional options to
data.table::fwrite()
Examples
dat <- data.table::data.table(a=rnorm(10), b=rexp(10))
write_tsv(dat, 4)
#> a b
#> -2.1896 0.0237
#> -0.8528 0.2946
#> 0.9729 0.2691
#> 0.2486 2.0233
#> -0.9661 0.1824
#> -0.0518 3.8483
#> -2.0842 0.3076
#> -0.5497 1.0715
#> 1.0819 1.6136
#> 0.2544 0.7173