Conditions related to finite values
row_finites(.data, match_type = "none", ...) # S3 method for matrix row_finites(.data, match_type = "none", ...) # S3 method for data.frame row_finites(.data, match_type = "none", ...)
.data | A two-dimensional data structure. |
---|---|
match_type | One of ("all", "any", "none", "which_first", "count"). Possibly abbreviated. |
... | Arguments passed on to
|
# consistency with R with respect to NA/NaN df <- data.frame(NaN, NA_real_, NA_complex_, NA_integer_, NA_character_, NA) sapply(df, is.finite)#> NaN. NA_real_. NA_complex_. NA_integer_. NA_character_. #> FALSE FALSE FALSE FALSE FALSE #> NA. #> FALSErow_finites(df, "none")#> [1] TRUE# complex also supported mat <- matrix(as.complex(Inf), nrow = 2L, ncol = 2L) mat[1L] <- 0+0i row_finites(mat, "any")#> [1] TRUE FALSE