complete_cases_array.Rd
complete_cases_array
is generalization of complete_cases
to arrays. any_cases_array
tests for any non-NA rather than all
non-NA along margin.
any_cases_array(a, margin = 1) all_cases_array(a, margin = 1)
a | multidimensional array |
---|---|
margin | margins to test along |
matrix
a <- array(0, dim =c(3,4,2)) a[2,2,] <- NA any_cases_array(a, margin=1)#> [1] TRUE TRUE TRUEany_cases_array(a, margin=c(1,2))#> [,1] [,2] [,3] [,4] #> [1,] TRUE TRUE TRUE TRUE #> [2,] TRUE FALSE TRUE TRUE #> [3,] TRUE TRUE TRUE TRUEall_cases_array(a, margin=1)#> [1] TRUE FALSE TRUEall_cases_array(a, margin=c(1,2))#> [,1] [,2] [,3] [,4] #> [1,] TRUE TRUE TRUE TRUE #> [2,] TRUE FALSE TRUE TRUE #> [3,] TRUE TRUE TRUE TRUE