[R] remove descriptions from output

arun smartpink111 at yahoo.com
Fri Jun 29 14:16:33 CEST 2012


HI,
You could get the results by either one of these "as.":

 as.integer(filter(1:10,rep(1,3)))
 [1] NA  6  9 12 15 18 21 24 27 NA
> as.numeric(filter(1:10,rep(1,3)))
 [1] NA  6  9 12 15 18 21 24 27 NA
    

A.K.



----- Original Message -----
From: Rolf Turner <rolf.turner at xtra.co.nz>
To: Kathie <kathryn.lord2000 at gmail.com>
Cc: r-help at r-project.org
Sent: Thursday, June 28, 2012 4:04 PM
Subject: Re: [R] remove descriptions from output

On 28/06/12 22:24, Kathie wrote:
> Dear R users,
>
> I'd like to remove some descriptions when I use "filter".
>
>> filter(1:10, rep(1, 3))
> Time Series:
> Start = 1
> End = 10
> Frequency = 1
>   [1] NA  6  9 12 15 18 21 24 27 NA
>
>
> That is, I want only this
>
>   [1] NA  6  9 12 15 18 21 24 27 NA
>
> Thank you in advance.

Use as.vector() on the output of filter.

     cheers,

         Rolf Turner

______________________________________________
R-help at r-project.org mailing list
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.




More information about the R-help mailing list