[R] Export to .txt

stat.kk stat.kk at gmail.com
Wed Nov 2 07:14:01 CET 2011


Oh, Im sorry. My file isnt a function but script 'script.R' which looks
something like that:

cat('Instruction no 1', '\n')
browser()   # place for fulfilling it

cat('Instruction no 2', '\n')
browser()   # place for fulfilling it

etc.

I am running it by
sink(file='output.txt')
source('script.R')
sink(NULL)

but it doesnt work as I would like. I cant see the output also via saving
workaspace into .Rhistory file. The goal I would like to achieve is the same
file as via File - Save to file... option - but I work in command line.



--
View this message in context: http://r.789695.n4.nabble.com/Export-to-txt-tp3965699p3971924.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list