Skip to content
Prev 167756 / 398502 Next

finding row and column indices of date in multiple columns of a data frame

Hi,

I have a data.frame SAMPLES with columns:

Site	  Site#   Season   Day1   Day2   Day3

Day1, Day2, Day3 are class "Date", the other columns are numeric or  
factor.

I have a date "mydate" that may or may not be listed in my data.frame  
and I need to find that out.
If "mydate" is there, I want to get the number of the data.frame row  
where it occurs.

"mydate" may be in any of the three date columns and if it is there,  
it appears only once.

Thank you for any advice and sorry if this is ni FAQ's - I couldn't  
find it.

Gonzalo