It looks like you want the mean of a variable for each level of year, type, variety, and seed. I would suggest this:
library(tidyverse)
meandata <- data %>%
group_by(year, Type, VarFH.PH, Appli1.2) %>%
summarise(mean_yeald_type1=mean(yeald, na.rm=TRUE))
This calculates the mean yeald for every combination of year, Type, VarFH.Ph, and Appli1.2 and you'll have a data.frame which will have 5 columns: year, Type, VarFH.Ph, Appli1.2 and mean_yeald_type1