This number is how many trees they looked at overall to get the ten fruit - high numbers represent worse performance.
E1 Ntrees: Prepare the data
Read the data in and pre-process it.
Show the code
e1 <-readRDS("001-00-e1-data.RDS")# remove things from the raw data to make it # suitable for this particular analysis# remove samples that did not look at a treee1 <- e1 %>%filter(fl>0)# remove the second (and any subsequent) *consecutive* duplicatese1 <- e1 %>%group_by(pp, rr, tb) %>%filter(is.na(tl !=lag(tl)) | tl !=lag(tl)) %>%ungroup()# remove trials where they failed to get 10 fruite1 <- e1 %>%group_by(pp, rr, tb) %>%mutate(max_fr =max(fr)) %>%ungroup() %>%filter(max_fr==10)# average over tree-visits to get counts for each trialntr.counts <- e1 %>%select(pp, rr, st, tb, tl) %>%group_by(pp, rr, st, tb) %>%summarise(ntrees=n()) %>%ungroup() %>%mutate(pp=as_factor(pp), rr=as_factor(rr), st=as_factor(st))# average over trials to get mean count for each stagentr <- ntr.counts %>%group_by(pp, rr, st) %>%summarise(mean_ntrees_per_stage=mean(ntrees))saveRDS(ntr, "e1_ntrees_plot_data.rds")