[R] Results of applying na.omit on zoo object
Gabor Grothendieck
ggrothendieck at gmail.com
Tue Sep 20 02:23:28 CEST 2011
On Mon, Sep 19, 2011 at 7:42 PM, Marc Schwartz <marc_schwartz at me.com> wrote:
>
> On Sep 19, 2011, at 5:06 PM, Gabor Grothendieck wrote:
>
>> On Mon, Sep 19, 2011 at 5:33 PM, Marc Schwartz <marc_schwartz at me.com> wrote:
>>> On Sep 19, 2011, at 4:00 PM, Rich Shepard wrote:
>>>
>>>> On Mon, 19 Sep 2011, Marc Schwartz wrote:
>>>>
>>>>>> Is there a way to omit only those rows where all columns contain 'NA'?
>>>>
>>>>> You can look at ?complete.cases for one approach, presuming that it will
>>>>> work on zoo objects.
>>>>
>>>> Marc,
>>>>
>>>> Do I even need to worry about these NAs? Thanks to Gabor I have a data
>>>> frame with 296 stream/parameter sets. Each set begins and ends on a
>>>> different date (used as the zoo index).
>>>>
>>>> What I want to do initially is plot the time series for each
>>>> stream/parameter to see what each has to tell us. In this case, if there are
>>>> years of NAs prior to the fist measurement for that stream/parameter pair,
>>>> will this affect anything.
>>>>
>>>> On a related note, I'm reading the zoo help pages and vignettes but do not
>>>> see the syntax for specifying which stream/parameter pair I want to plot.
>>>> What do I read to learn how to do this?
>>>>
>>>> Rich
>>>
>>>
>>> Hi Rich,
>>>
>>> Let me start by acknowledging that I have little practical experience in time series analyses, much less proficiency with the zoo package. I just don't come across them much in clinical trials/studies, at least the ones that I have been involved with over the past 25+ years.
>>>
>>> I do know from prior posts on the matter, that the zoo package seems to have some of its own approaches to dealing with dates, as compared to base R. So you may need to be clear on the differentiation in code/functions required to use some of the package functionality.
>>
>> This is not at all the case. zoo relies on external facilities to
>> handle index classes and not its own facilities.
>>
>> In some cases zoo extends base facilities or adds new classes to give
>> additional possibilities but when this is done the base functionality
>> is always extended and never changed. There are no exceptions to this
>> rule.
>
> My apologies then Gabor for perhaps over-generalizing. As noted, I do not use zoo, but of course have seen posts previously regarding the conflicts between R's as.Date() function and zoo's function of the same name, due to the presence/absence of the 'origin' argument. I was not sure if there may be others. Thanks for the clarification.
>
You do realize that what you are erroneously describing, again, as a
conflict is not a conflict at all?
--
Statistics & Software Consulting
GKX Group, GKX Associates Inc.
tel: 1-877-GKX-GROUP
email: ggrothendieck at gmail.com
More information about the R-help
mailing list