BPQuant R Function

added R script containing BPQuant function