Added R Function