Update pcs.R

fix for issue #5