>>>>> "Eric" == Eric C Jennings <[EMAIL PROTECTED]>
>>>>>     on Wed, 30 Nov 2005 21:39:12 -0800 writes:

    Eric> Hey there
    Eric> I have two vectors:

    Eric> y<- c(0.4,  0.0,  0.2, -0.2, -0.6, 0.2, 0.0, 0.0, 0.4, 0.4, 0.2)

hmm, this is *one* vector , not two !

    Eric> In the vector y, I want to access (in the order given) all of the 
values in 
    Eric> between each of the specific values of given.

    Eric> I understand subsetting with y[i], but how do I get to ssomewhere in 
    Eric> between -0.6 and 0.2?

Though you could be much clearer, in your question, I'm pretty
sure you are looking for  *interpolation*; 
In that case, I'd recommend  approx() or spline()  -- or with same
functionality but more elegant interface -- approxfun() and
splinefun().

Martin Maechler, ETH Zurich

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to