I have a data.table which I want to filter to find only rows of data where fresh_flow==0.187677777777778
.
df<-data.table::as.data.table(fresh_flow=as.numeric(rep(c(0.59347556, 0.05940667, 0.18767778, 1.87677778, 0.01876778),each=1e2)))
df%>%
dplyr::filter(fresh_flow==0.187677777777778)
Returns a result as expected. With my data it returns an empty table even though the column type is also numeric and contains the same unique values. Why?
df$fres_flow %>% str()
Classes ‘data.table’ and 'data.frame': 2000 obs. of 1 variable:
$ fresh_flow: num 0.188 0.188 0.188 0.188 0.188 ...
- attr(*, ".internal.selfref")=<externalptr>
MyData$fresh_flow %>% str()
num [1:10499995] 0.5935 0.5935 0.0594 0.0594 0.0594
unique(MyData$fresh_flow)
[1] 0.59347556 0.05940667 0.18767778 1.87677778 0.01876778