https://github.com/cran/cutpointr
Revision 72e43ccd243bf013af304abb3f0083dc3ad90527 authored by Christian Thiele on 18 December 2019, 14:00:08 UTC, committed by cran-robot on 18 December 2019, 14:00:08 UTC
1 parent 030e709
Raw File
Tip revision: 72e43ccd243bf013af304abb3f0083dc3ad90527 authored by Christian Thiele on 18 December 2019, 14:00:08 UTC
version 1.0.1
Tip revision: 72e43cc
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