using RDatasets, DataFrames mlmf = dataset("mlmRev","Gcsemv");
Produces │ 1 │ "20920" │ "16" │ "M" │ 23.0 │ NaN │ │ 2 │ "20920" │ "25" │ "F" │ NaN │ 71.2 │ │ 3 │ "20920" │ "27" │ "F" │ 39.0 │ 76.8 │ │ 4 │ "20920" │ "31" │ "F" │ 36.0 │ 87.9 │ │ 5 │ "20920" │ "42" │ "M" │ 16.0 │ 44.4 │ │ 6 │ "20920" │ "62" │ "F" │ 36.0 │ NaN │ │ 7 │ "20920" │ "101" │ "F" │ 49.0 │ 89.8 │ │ 8 │ "20920" │ "113" │ "M" │ 25.0 │ 17.5 │ │ 9 │ "20920" │ "146" │ "M" │ NaN │ 32.4 │ │ 10 │ "22520" │ "1" │ "F" │ 48.0 │ 84.2 │ │ 11 │ "22520" │ "7" │ "M" │ 46.0 │ 66.6 │ Should be NAs but here we have NaNs 2016-05-14 17:22 GMT+10:00 Tamas Papp <tkp...@gmail.com>: > Again: please provide a self-contained example. > > On Sat, May 14 2016, Андрей Логунов wrote: > > > The misuse of the word is all mine. > > But the problem persists. RDatasets in Win10 produce NaN-values for > > unvailable values (NAs) as compared to Unices. > > So the funcs dropna() and complete_cases() 'do not work' as needed? no > > filtering done. As I understand Complete_cases() uses a bitarray. But is > > there a shortcut? > > > > > > > > суббота, 14 мая 2016 г., 16:26:01 UTC+10 пользователь Tamas Papp написал: > >> > >> On Sat, May 14 2016, Андрей Логунов wrote: > >> > >> > To add, fiddling with array comprehensions as per the problem with > NaNs > >> > found a buggy thing. > >> > The following code does not work: > >> > > >> > [x for x in filter(!isnan, convert(Array,dataframe[:fld]))] > >> > >> This is not a bug. ! does not operate on functions, only on concrete > >> values (Bitarray, Bool, etc). > >> > >> Also, even if you find a bug, "does not work" is unlikely to get you any > >> help without an error message and preferably a self-contained example. > >> > >> Best, > >> > >> Tamas > >> > >