Hello,
I have a large matrix (foo), I have to split by weeks and in which measures
start at different points of time.
Now I am looking for the number of the week, in which a specific value
appears. I do not need the date or any other information from a row, but
(due to structure of result table) the indicator i.
One example:
foo has two columns: Date, ID
foo.all<- split(foo, cut(foo$Date, "weeks")
l_foo<-length(foo.all)
for (i in 1:l_foo){
foo.i<-foo.all[[i]]
}
Question:
Given I search for ID=4. How do I find the i, in which 4 appears?
Thanks in advance!
--
View this message in context:
http://n4.nabble.com/First-Appearance-of-value-in-splitted-matrix-tp1564964p1564964.html
Sent from the R help mailing list archive at Nabble.com.
[[alternative HTML version deleted]]