Hi there,

I am working with DataArrays, and would like to calculate the mean of the DataArray content while ignoring NA, NaN and also Inf values. This seems like a basic use case, so I apologies in advance for failing in finding this in the documentation. My solution to the problem is to make a bit mask which indicates valid elements, but this approach (see below) left me puzzled by some weird behavior. Hence my two questions:

- How can best I achieve selecting valid data from a data array?
- What is going on in the script below, why isn’t
`isfinite(x) & !isna(x)`

giving consistent results?

```
julia> using DataFrames
WARNING: Method definition describe(AbstractArray) in module StatsBase at /Users/jon.alm.eriksen/.julia/v0.5/StatsBase/src/scalarstats.jl:573 overwritten in module DataFrames at /Users/jon.alm.eriksen/.julia/v0.5/DataFrames/src/abstractdataframe/abstractdataframe.jl:407.
julia> x = @data [1, NA, NaN, Inf]
4-element DataArrays.DataArray{Float64,1}:
1.0
NA
NaN
Inf
julia> isfinite(x) & !isna(x)
4-element DataArrays.DataArray{Bool,1}:
true
false
true
true
julia> isfinite(x) & !isna(x)
4-element DataArrays.DataArray{Bool,1}:
true
false
false
true
julia> isfinite(x) & !isna(x)
4-element DataArrays.DataArray{Bool,1}:
true
false
false
false
```

Best

Jon