R/RcppExports.R

Defines functions fastLm_impl armadillo_set_number_of_omp_threads armadillo_get_number_of_omp_threads armadillo_set_seed armadillo_set_seed_random armadillo_version

Documented in armadillo_get_number_of_omp_threads armadillo_set_number_of_omp_threads armadillo_set_seed armadillo_set_seed_random armadillo_version

# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

#' Report the version of Armadillo
#'
#' @details The version is defined by Armadillo in the header \code{arma_version.hpp}.
#' @param single A logical vector indicating whether a single return values is requested,
#' or a named vector with three elements \code{major}, \code{minor} and \code{patch}.
#' @return Depending on the value of \code{single}, either a single number describing
#' the Armadillo version or a named vector with three elements \code{major}, \code{minor}
#' and \code{patch}.
#' @seealso Armadillo header file \code{arma_version.hpp}.
armadillo_version <- function(single) {
    .Call(`_RcppArmadillo_armadillo_version`, single)
}

#' Set the Armadillo Random Number Generator to a random value
#'
#' @details
#' Depending on whether RcppArmadillo was compiled for the C++98 standard
#' (currently the default) or for C++11 (optional), two different RNGs may be used.
#' This function resets either. For C++98, the R programming language's RNG is used.
#' For C++11, the RNG included in the \code{<random>} library is used only when
#'  \code{#define ARMA_USE_CXX11_RNG} is placed before \code{#include <RcppArmadillo.h>}.
#'  Otherwise, the R programming language's RNG will be used.
#' @return The function is invoked for its side effect and has no return value.
#' @note This has been found to not work as espected in \pkg{RStudio}
#' as its code also uses the system RNG library. You may have to either
#' not run within \pkg{RStudio} or change your code to use a different RNG such
#' as the one from R.
#' @seealso The R documentation on its RNGs all of which are accessible via \pkg{Rcpp}.
armadillo_set_seed_random <- function() {
    invisible(.Call(`_RcppArmadillo_armadillo_set_seed_random`))
}

#' Set the Armadillo Random Number Generator to the given value
#'
#' @param val The seed used to initialize Armadillo's random number generator.
#' @details
#' Depending on whether RcppArmadillo was compiled for the C++98 standard
#' (currently the default) or for C++11 (optional), two different RNGs may be used.
#' This function resets either. For C++98, the R programming language's RNG is used.
#' For C++11, the RNG included in the \code{<random>} library is used only when
#'  \code{#define ARMA_USE_CXX11_RNG} is placed before \code{#include <RcppArmadillo.h>}.
#'  Otherwise, the R programming language's RNG will be used.
#' @return The function is invoked for its side effect and has no return value.
#' @note This has been found to not work as espected in \pkg{RStudio}
#' as its code also uses the system RNG library. You may have to either
#' not run within \pkg{RStudio} or change your code to use a different RNG such
#' as the one from R.
#' @seealso The R documentation on its RNGs all of which are accessible via \pkg{Rcpp}.
armadillo_set_seed <- function(val) {
    invisible(.Call(`_RcppArmadillo_armadillo_set_seed`, val))
}

#' Report (or Set) Maximum Number of OpenMP Threads
#'
#' @param n Number of threads to be set
#' @return For the getter, and on a system with OpenMP, the maximum
#' number of threads that OpenMP may be using and on systems without it,
#' one. The setter does not return a value.
armadillo_get_number_of_omp_threads <- function() {
    .Call(`_RcppArmadillo_armadillo_get_number_of_omp_threads`)
}

#' @rdname armadillo_get_number_of_omp_threads
armadillo_set_number_of_omp_threads <- function(n) {
    invisible(.Call(`_RcppArmadillo_armadillo_set_number_of_omp_threads`, n))
}

fastLm_impl <- function(X, y) {
    .Call(`_RcppArmadillo_fastLm_impl`, X, y)
}

Try the RcppArmadillo package in your browser

Any scripts or data that you put into this service are public.

RcppArmadillo documentation built on Nov. 2, 2023, 5:21 p.m.