added print snippet to R