update sampling.pgls and example.R