While plotting levelplot I want to add mean and median if the plot. manually calculating and adding is tedious. any other way?
p1=levelplot(R_land, par.settings=mapTheme, at=my.brks, colorkey=myColorkey , 
margin=F,main=list('IMD'),xlab = 'Mean=0.728
Median=0.368')
print(p1) 
also hopefully not as a label but top right of the plot.
data:
head(Gm,n=10)
         x     y       Gm
 1:  66.50 38.50 1.611716
 2:  66.75 38.50 1.825812
 3:  67.00 38.50 1.873785
 4:  67.25 38.50 1.936212
 5:  67.50 38.50 2.025188
 6:  67.75 38.50 1.982969
 7:  68.00 38.50 1.696595
 8:  68.25 38.50 1.740960
 9:  68.50 38.50 1.774679
10:  68.75 38.50 1.866798
R_land<-rasterfromXYZ(Gm)
