files {operators} | R Documentation |
A set of functions to quickly redirect output to a file or read character vectors from a file.
object %>% file object %>>% file object %2>% file object %2>>% file object %*>% file object %*>>% file object %<% file object %<<% file
object |
R object to print to the file or to read from the file |
file |
file in which to read or write |
%>%
sends the object
to the file
. The object is printed to the file
according to the function specified in the operators.print
option supplied with this package,
most likely to be the print
function. See examples.
%>>%
appends the output to the file.
%2>%
sends the message stream to the file by sink
ing the
message
stream to the file. See sink
for details.
%2>>%
appends the message stream to the file.
%*>%
sends both output and message streams to the file. %*>>%
appends them.
%<%
reads the content of the file into the object
. %<<%
appends the
content of the file to the object.
NULL, used for the side effects.
Romain Francois <francoisromain@free.fr>
## Not run: rnorm(30) %>% "test.txt" stop("problem") %2>>% "test.txt" x %<% "test.txt" x ## End(Not run)