SciNotation: Get the coefficient and exponent of Scientific notation.

Description Usage Arguments Value Author(s) Examples

Description

Get the coefficient and exponent of Scientific notation.

Usage

1
SciNotation(table, ndigits, round = TRUE)

Arguments

table

A sample of data, can be a number, a vector or a matrix, an array or a table.

ndigits

Number of digits to be shown in the coefficient of the scientific notation.

round

Logical, the last digit of the coeeficient is obtained by rounding, otherwise by truncating.

Value

A list containing the scientific notation coefficient and scientific notation exponent of the sample.

Author(s)

R. Wayne Oldford and Xiaomei Yu

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
table1 <- c(7999,7998,7998,7997)
SciNotation(table1)

table2<-c(97.62,92.24,100.90,90.39,48.29,42.31,49.98,39.09,75.23,75.16,100.11,74.23,49.69,57.21,80.19,51.09)
table2 <- matrix(table2, nrow=4,byrow=TRUE,dimnames=list(c("North" ,"South","East","West"),c("Q1","Q2","Q3","Q4")))
table2
SciNotation(table2, ndigits=2)

UCBAdmissions
SciNotation(UCBAdmissions, ndigits=1, round=FALSE)

Titanic
SciNotation(Titanic)

rwoldford/tidy-table documentation built on May 12, 2019, 4:38 a.m.