testR implementation in R