Last active
August 29, 2015 14:22
-
-
Save ZeccaLehn/d711c43bfc9aaf6214ea to your computer and use it in GitHub Desktop.
Sink and Print from a text file in R
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sink("file.txt", append = T, | |
split = FALSE) # Direct text to "file.txt" | |
print("hello world") | |
print("hello world again") | |
shell.exec("file.txt") # Open text file in editor | |
unlink("file.txt") # Closes sink and now prints all to console | |
closeAllConnections() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment