reading output into R