logseq: Log base 10 sequence, floor and ceiling

Description Usage Arguments Value Author(s) Examples

View source: R/misc.R

Description

Sequence, floor and ceiling operations in log 10 space.

Usage

1
2
3
4
5
    logseq(from, to, length.out)

    logfloor(x)

    logceiling(x)

Arguments

from, to

Positive non-zero values to start and end sequence, respectively.

length.out

The number of elements the resulting sequence should containg. If absent, function will attempt to generate numbers factors of 10 apart.

x

A value to round.

Value

logseq returns an array numbers evenly distanced in log10-space.

logfloor and logceiling return a value that is 10 raised to an integer number.

Author(s)

Daniel Lai

Examples

1
2
3
4
    logseq(1e-10, 1e3)
    logseq(1e-10, 1e3, length.out = 10)
    logceiling(2.13e-6)
    logfloor(2.13e-6)

Example output

Loading required package: Biostrings
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, sd, var, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, basename, cbind, colMeans, colSums, colnames,
    dirname, do.call, duplicated, eval, evalq, get, grep, grepl,
    intersect, is.unsorted, lapply, lengths, mapply, match, mget,
    order, paste, pmax, pmax.int, pmin, pmin.int, rank, rbind,
    rowMeans, rowSums, rownames, sapply, setdiff, sort, table, tapply,
    union, unique, unsplit, which, which.max, which.min

Loading required package: S4Vectors
Loading required package: stats4

Attaching package: 'S4Vectors'

The following object is masked from 'package:base':

    expand.grid

Loading required package: IRanges
Loading required package: XVector

Attaching package: 'Biostrings'

The following object is masked from 'package:base':

    strsplit

 [1] 1e-10 1e-09 1e-08 1e-07 1e-06 1e-05 1e-04 1e-03 1e-02 1e-01 1e+00 1e+01
[13] 1e+02 1e+03
 [1] 1.000000e-10 2.782559e-09 7.742637e-08 2.154435e-06 5.994843e-05
 [6] 1.668101e-03 4.641589e-02 1.291550e+00 3.593814e+01 1.000000e+03
[1] 1e-05
[1] 1e-06

R4RNA documentation built on Nov. 8, 2020, 5:15 p.m.