[R] values in between

Eric C. Jennings matheric at u.washington.edu
Thu Dec 1 06:39:12 CET 2005

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?

Eric Jennings
matheric at myuw.net

More information about the R-help mailing list