Testing R functionality