Skip to content
Back to formatted view

Raw Message

Message-ID: <F87DBA8A-2BCD-49D3-A7C8-4C1491F11BBE@comcast.net>
Date: 2016-05-24T16:32:41Z
From: David Winsemius
Subject: numeric inputs to sweep produce NaN...
In-Reply-To: <CAAjnpdj4U=VvT-60y0jPdnBqrqg3d-POMDqEdOnrP+K3EYsnww@mail.gmail.com>

> On May 24, 2016, at 8:49 AM, Witold E Wolski <wewolski at gmail.com> 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, "-" )
>> sum(is.nan(unlist(normprotquant)))
> [1] 31
> 

Post output of dput(head(protquant)) and dput(head(normalize))

> 
> version R 3.3.0
> 
> best regards Witold
> -- 
> Witold Eryk Wolski
> 
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

David Winsemius
Alameda, CA, USA