Hi,
If I have a data frame A with the following format:
Day1 Day2 Day3 Day4
1 1979-11-02 1979-11-03 1979-11-04 <NA>
2 1979-12-06 <NA> <NA> <NA>
3 1979-12-13 1979-12-14 1979-12-15 1979-12-16
4 1979-12-20 <NA> <NA> <NA>
And a date "1979-12-14", for example.
How can I find the row or rows of the data frame were that date can be
found?
The date is stored in a date format variable called 'day'. I am trying
commands such as A==day, expecting to see a matrix of logical values, but I
am only getting error messages such as "(list) object cannot be coerced to
'double'".
I am looking for a simple command that would return, in this case, a vector:
FALSE FALSE TRUE FALSE
Thanks for any help!
Gonçalo
[[alternative HTML version deleted]]
______________________________________________
[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
and provide commented, minimal, self-contained, reproducible code.