Version 3.6-12 is available for S-PLUS 8.0, ported by Patrick Aboyoun, who was then at what was then Insightful. Comparing this to the R version 3.6-12 should help if you want to port more recent versions.