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
#> 0.9607 2.6570
#> 0.3722 0.0099
#> 0.7920 1.9613
#> -0.3665 2.4086
#> 0.9264 0.6694
#> -2.4381 0.2144
#> -1.1682 1.7223
#> -0.8849 0.3323
#> -0.0970 3.6542
#> 0.8129 0.5738