https://github.com/cran/cutpointr
Raw File
Tip revision: 2a9508b29dfa63182cfa56e60908d36e099266fd authored by Christian Thiele on 29 June 2021, 05:30:02 UTC
version 1.1.1
Tip revision: 2a9508b
any_inf.cpp
#include <Rcpp.h>
using namespace Rcpp;

// [[Rcpp::export]]
bool any_inf(NumericVector x) {
    int len = x.size();
    for(int i=0; i<len; i++){
        if (!(std::isfinite(x[i]))) return true;
    }
    return false;
}
back to top