Learn R Programming

HKRbook (version 0.1.3)

mmstat.dec: mmstat.dec

Description

Computes the number of the significant digits based on the smallest non-zero difference of the sorted data.

Usage

mmstat.dec(x, ord = NULL)

Value

The number of significant digits and (the subset of) the order of the data.

Arguments

x

numeric: data vector

ord

index: subset of the ordered data (default: NULL)

Examples

Run this code
x <- rnorm(20)
d <- mmstat.dec(x)
# create strings so that they are unique (if they were)
sprintf("%.*f", d$dec, x)

Run the code above in your browser using DataLab