I have a zoo object z z Value 2003-11-15 2.22 2003-11-17 2.26 2003-11-19 2.28 2003-11-22 2.54 2003-11-26 2.55
I wish to find the entry 2 entries before "2003-11-26". How do I do this? I thought I might be able to say index(z["2003-11-26"]) and have it return 5 so I could then say z[3]. But this does not work. I can not find an answer in ?index In the meantime I am using a loop, can any one help? cheers Worik [[alternative HTML version deleted]] ______________________________________________ R-help@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.