I need to aggregate by Date, my "Day" dataset:
>
head(Day)
Date Day Month Year TimeDay Room Temperature Light RH
1 02/09/2013 2 9 2013 08:00:00 2 21.7 71.76 100.00
2 02/09/2013 2 9 2013 08:15:00 2 21.7 61.27 100.00
3 02/09/2013 2 9 2013 08:30:00 2 21.7 58.96 100.00
4 02/09/2013 2 9 2013 08:45:00 2 21.8 52.96 100.00
5 02/09/2013 2 9 2013 09:00:00 2 22.0 59.92 86.26
6 02/09/2013 2 9 2013 09:15:00 2 22.2 65.12 84.01
but including the column 6, which corresponds to Room number:
newDay <- aggregate(Day[, 6:9], list(Day$Date), mean,na.rm=TRUE)
I got the following warning:
There were 50 or more warnings (use warnings() to see the first 50)
and the "Room" column in the new dataset "newDay" results in NAs.
Is it because the "Room" column is a factor? How should I deal this issue?