| Title: | 'SciViews::R' - Fast and Parallelized R Functions |
|---|---|
| Description: | A Series of Fast Math and Stat Functions, Parallelized using 'RcppParallel'. |
| Authors: | Philippe Grosjean [aut, cre] (ORCID: <https://orcid.org/0000-0002-2694-9471>) |
| Maintainer: | Philippe Grosjean <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.0 |
| Built: | 2026-05-26 08:07:55 UTC |
| Source: | https://github.com/SciViews/svFast |
Fast version of logarithmic and exponential functions (when vector size >=
50000). log_() computes the natural logarithm of x (base e by default),
log2_() computes the base 2 logarithm, log10_() computes the base 10.
log1p_() computes log(1 + x) accurately even for small x.
exp_() computes the exponential function. expm1_() computes exp(x) - 1
accurately even for small x.
log10_(x, para = 50000L) log2_(x, para = 50000L) log1p_(x, para = 50000L) exp_(x, para = 50000L) expm1_(x, para = 50000L) log_(x, base = 2.71828182845905, para = 50000L)log10_(x, para = 50000L) log2_(x, para = 50000L) log1p_(x, para = 50000L) exp_(x, para = 50000L) expm1_(x, para = 50000L) log_(x, base = 2.71828182845905, para = 50000L)
x |
vector of numeric values |
para |
the minimum length of |
base |
the base of the logarithm (e = |
They are not generic functions and do not process factor, Date, POSIXt, difftime, complex, or S4 objects (use base R equivalent function instead). Data frames are processed column-wise, providing each column is compatible. All attributes are preserved.
A numeric vector, matrix, or data frame with the transformed values.
log10(), log2(), log(), log1p(), exp(), expm1()
log_(1:5) log_(1:5, base = 2.5)log_(1:5) log_(1:5, base = 2.5)
Fast version of rounding (when vector size >= 50000).
ceiling_() takes a single numeric argument x and returns a numeric vector
containing the smallest integers not less than the corresponding elements of
x. It is similar to ceiling().
floor_() takes a single numeric argument x and returns a numeric vector
containing the largest integers not greater than the corresponding elements of
x. It is similar to floor().
trunc_() takes a single numeric argument x and returns a numeric vector
containing the integers formed by truncating the values in x toward 0. It
is similar to trunc().
round_() rounds the values in its first argument to the
specified number of decimal places (default 0). See 'Details' about "round
to even" in round() when rounding off a 5.
signif_() rounds the values in its first argument to the
specified number of significant digits.
ceiling_(x, para = 50000L) floor_(x, para = 50000L) trunc_(x, para = 50000L) round_(x, digits = 0L, para = 50000L) signif_(x, digits = 6L, para = 50000L)ceiling_(x, para = 50000L) floor_(x, para = 50000L) trunc_(x, para = 50000L) round_(x, digits = 0L, para = 50000L) signif_(x, digits = 6L, para = 50000L)
x |
vector of numeric values |
para |
the minimum length of |
digits |
integer indication the number of decimal places ( |
They are not generic functions and do not process factor, Date, POSIXt, difftime, complex, or S4 objects (use base R equivalent function instead). Data frames are processed column-wise, providing each column is compatible. All attributes are preserved.
A numeric vector, matrix, or data frame with the transformed values.
floor_(c(1.23, 4.56, -7.89))floor_(c(1.23, 4.56, -7.89))
Fast version of trigonometric functions (when vector size >= 50000). They respectively compute the cosine, sine, tangent, arc-cosine, arc-sine, arc-tangent, and the two-argument arc-tangent.
cospi_(x), sinpi_(x), and tanpi_(x), compute cos(pi*x),
sin(pi*x), and tan(pi*x).
cos_(x, para = 50000L) sin_(x, para = 50000L) tan_(x, para = 50000L) acos_(x, para = 50000L) asin_(x, para = 50000L) atan_(x, para = 50000L) cospi_(x, para = 50000L) sinpi_(x, para = 50000L) tanpi_(x, para = 50000L)cos_(x, para = 50000L) sin_(x, para = 50000L) tan_(x, para = 50000L) acos_(x, para = 50000L) asin_(x, para = 50000L) atan_(x, para = 50000L) cospi_(x, para = 50000L) sinpi_(x, para = 50000L) tanpi_(x, para = 50000L)
x |
vector of numeric values |
para |
the minimum length of |
They are not generic functions and do not process factor, Date, POSIXt, difftime, complex, or S4 objects (use base R equivalent function instead). Data frames are processed column-wise, providing each column is compatible. All attributes are preserved.
A numeric vector, matrix, or data frame with the transformed values.
cos(), sin(), tan(), acos(), asin(), atan(), atan2()
cos_(1:5)cos_(1:5)