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.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to