Re: [R] numeric inputs to sweep produce NaN...

2016-05-24 Thread David Winsemius
> On May 24, 2016, at 8:49 AM, Witold E Wolski wrote: > > I have two inputs to sweep which are numeric (with a few NA's) but the > output is NaN. How Why? > > >> sum(!is.numeric(unlist(protquant))) > [1] 0 >> sum(!is.numeric(normalize)) > [1] 0 >> normprotquant <- sweep(protquant, 2, normalize

[R] numeric inputs to sweep produce NaN...

2016-05-24 Thread Witold E Wolski
I have two inputs to sweep which are numeric (with a few NA's) but the output is NaN. How Why? > sum(!is.numeric(unlist(protquant))) [1] 0 > sum(!is.numeric(normalize)) [1] 0 > normprotquant <- sweep(protquant, 2, normalize, "-" ) > sum(is.nan(unlist(normprotquant))) [1] 31 version R 3.3.0 bes