round2: publish-level round

Description Usage Arguments Details Author(s) Examples

View source: R/base_rond.plus.R

Description

round.plus is a specific round method for print decimals in publication.round2 is based on lucky::round.plus.round2 is recommanded to do an optimized show.

Usage

1
round2(x, digits = 3)

Arguments

x

a numeric vector

digits

decimal places

Details

round2 would not deal with value like NA and Inf.round2 supports multiple vector.

Author(s)

Weibin Huang<654751191@qq.com>

Examples

1
2
3
4
5
6
7
8
9
round2(200.4526)
round2(1)
round2(0.9)
round2(0.00258)
round2(0.002)
round2(0.001)
round2(0.0004)
a <- c(200.4526,1,0.9,0.00258,0.002,0.001,0.0004,NA,Inf,-Inf)
round2(a)

shijianasdf/BasicBioinformaticsAnalysisFromZhongShan documentation built on Jan. 3, 2020, 10:08 p.m.