Thanks for these replies, Peter and Ben!
Essentially, I was trying to use quantile mapping to map the distribution of my modeled variables (in this case, phenotype) to observations. I used the quantile() function (with default “type 7” algorithm) in R to obtain the quantile values for the distribution of my observations, input this to SLiM as a file and in the final step, I was trying to then use a similar quantile() function in SLiM to map these quantiles to the modeled distribution of phenotypes.
Given your suggestions to use rank(), I think I should then change my approach: instead of using quantile() in R to obtain the quantile values for the distribution of my observations, I would then use rank() in R, and then use rank() again in SLiM, so that it's both using the same function for quantile mapping. I believe this should help me achieve the same goal if I was to use quantile() in both languages?
Thanks,
Darren