https://github.com/cran/cutpointr
Revision 8883cb6d23c8c690e6eeb8a8d074a5508e76f3d7 authored by Christian Thiele on 27 March 2019, 09:10:03 UTC, committed by cran-robot on 27 March 2019, 09:10:03 UTC
1 parent 7e56c82
Raw File
Tip revision: 8883cb6d23c8c690e6eeb8a8d074a5508e76f3d7 authored by Christian Thiele on 27 March 2019, 09:10:03 UTC
version 0.7.6
Tip revision: 8883cb6
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