asNumeric_no_warning: If the function Rmpfr::asNumeric returns a warning about...

View source: R/expected_number_of_clusters_stable_process.R

asNumeric_no_warningR Documentation

If the function Rmpfr::asNumeric returns a warning about inefficiency, silence it.

Description

The function Rmpfr::asNumeric prints the following warning: In asMethod(object) : coercing "mpfr1" via "mpfr" (inefficient). It is not clear how to avoid it nor how to silence it, hence this function. A cleaner solution may be available at: https://stackoverflow.com/questions/4948361/how-do-i-save-warnings-and-errors-as-output-from-a-function/4952908#4952908

Usage

asNumeric_no_warning(x)

Arguments

x

An object of class Rmpfr::mpfr1

Value

a "numeric" number


konkam/BNPdensity documentation built on March 14, 2024, 7:15 a.m.