Re: [R] values in between

From: Martin Maechler <maechler_at_stat.math.ethz.ch>
Date: Fri 02 Dec 2005 - 19:09:43 EST

>>>>> "Jim" == Jim Lemon <bitwrit@ozemail.com.au> >>>>> on Thu, 01 Dec 2005 21:34:51 -0500 writes:

    Jim> Eric C. Jennings wrote:
>> Hey there
>>
>> I have two vectors:
>>
>> y<- c(0.4, 0.0, 0.2, -0.2, -0.6, 0.2, 0.0, 0.0, 0.4, 0.4, 0.2)
>>
>> In the vector y, I want to access (in the order given) all of the values in
>> between each of the specific values of given.
>>
>> I understand subsetting with y[i], but how do I get to ssomewhere in
>> between -0.6 and 0.2?
>>
    Jim> Hi Eric,

    Jim> There was a function "filter" in the ts package, but that package seems     Jim> to have disappeared. A Q&D function that would do what you want is:

Jim, where have you been? :-)
If you just type 'filter' in your R session you see it's still there, namely in standard package 'stats' and this is the case since R version 1.9.0 which is ages old measured in R-time....



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Fri Dec 02 19:32:57 2005

This archive was generated by hypermail 2.1.8 : Fri 02 Dec 2005 - 20:31:03 EST