How can I redirect R's output from the console to a file
1
1
Entering edit mode
4.7 years ago
cristian ▴ 300

Dear all,

I am running this command:

Rsubread::buildindex(basename='output/genome/ref/index/subread/celegans',reference="output/genome/ref/seq/celegans.fa")


to build an index for the C. elegans genome. R then outputs lots of interesting information to the console.

Do you know how I can redirect that output to a file?

Thanks.

C.

rsubread redirection r output • 1.0k views
2
Entering edit mode

If you are running this in some R environment I think sink() function will do that read here

0
Entering edit mode

5
Entering edit mode
4.7 years ago
5heikki 10k
sink("yourOutput.txt")
sink()

0
Entering edit mode

1
Entering edit mode

0
Entering edit mode

Done. Thanks. I had upvoted it but I had not accepted it. I didn't know about accepting.