s-news
[Top] [All Lists]

Re: small question about NA

To: stephane.g.zebouni@jpmorgan.com
Subject: Re: small question about NA
From: Patrick Burns <pburns@pburns.seanet.com>
Date: Fri, 19 Aug 2005 15:22:16 +0100
Cc: s-news@lists.biostat.wustl.edu
In-reply-to: <OF2BE6C308.63F8EB7D-ON85257062.004D1288-85257062.004D47B2@jpmchase.com>
References: <OF2BE6C308.63F8EB7D-ON85257062.004D1288-85257062.004D47B2@jpmchase.com>
User-agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)
Sounds like

sum(x, na.rm=TRUE)

will do what you want.

Patrick Burns
patrick@burns-stat.com
+44 (0)20 8525 0696
http://www.burns-stat.com
(home of S Poetry and "A Guide for the Unwilling S User")

stephane.g.zebouni@jpmorgan.com wrote:


Hi,

I am using S-plus 6.1. I am making sums of vectors where no value (NA) can occur and I want to consider those values as 0 - is there an easy way to do that?

thanks a lot in advance

Stephane Zebouni

This communication is for informational purposes only. It is not intended
as an offer or solicitation for the purchase or sale of any financial
instrument or as an official confirmation of any transaction. All market prices,
data and other information are not warranted as to completeness or accuracy and
are subject to change without notice. Any comments or statements made herein do not necessarily reflect those of JPMorgan Chase & Co., its subsidiaries and affiliates.


<Prev in Thread] Current Thread [Next in Thread>