. . . "I am new to R, and was thinking whether there is a function that can help me see the output on the console and save it to a text file as well?" .