asNumeric_no_warning {BNPdensity}R 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


[Package BNPdensity version 2023.3.8 Index]