Here is some code to update the AvgPIC statistic by population. Let us know if that is what you are looking for.
library(dartR.base)
t1 <-
platypus.gl# separating populations, each population is contained in one genlight object
t2 <- seppop(t1)
# population names of each genlight object
names(t2)
# recalculating loc metrics, including AvgPIC
t3 <- lapply(t2, gl.recalc.metrics)
# AvgPIC in the updated dataset
head(t3$TENTERFIELD$other$loc.metrics$AvgPIC)
# AvgPIC in the original genlight object
head(t1$other$loc.metrics$AvgPIC)