R- Display value with aggregate
I have a dataframe in R with the following variables:
DateTime year dayYear diameter dendro
I want to calculate the min diameter for each day of the year for each
dendrometer, so I used aggregate:
dailymin <- aggregate(diameter~year+dayYear+dendro, FUN=min, data=myData)
However, I also need the time when the min diameter happened at each day
and dendro. Therefore, I need to keep the info contained in the variable
DateTime in the row of each min. Thanks for helping me.
No comments:
Post a Comment