The dataset is based on the growth of 250~ trees over 500 years. The columns are treeID, GrowthAmount. Because of the age of the data, the trees have varying amounts of measurements taken each year, and often no record for a given year.
I need to find the trees which have at least 350 measurements, then plot the mean growth for each year for only the selected trees against the year.
I have tried using select, subset, and many other things but my experience in r is very small, so I am looking for some help here
treedatalongsum = arrange(summarize(group_by(treedatalong, Tree), total = n()), desc(total))
treedatalongsum
tree%>% filter(Tree==1, 2, 3, 91,115, 116, 118, 102, 119, 121) %>% group_by(Tree)%>%summarize(mean(tree$Growth, na.rm = TRUE))
this was my original attempt and it did not work. I was trying to select the trees and have them labeled by tree ID and then show on the next column how much they grew on average
Thank you for your time and knowledge. I really appreciate it.