Dear all,
knitr writes a comment sign in front of each line of console output. This
extremely useful, especially for beginners who are starting to write scripts.
One could just compose their script in the console (getting immediate output)
and then copy the whole chunk into their .r-file.
I
?options
Change the prompt option:
options(prompt = # ) ## is I think what you want.
-- Bert
On Sat, Mar 2, 2013 at 5:35 AM, Marcus Kriele mkri...@me.com wrote:
Dear all,
knitr writes a comment sign in front of each line of console output. This
extremely useful, especially for beginners
Try the following to see if it does what you want:
## init
con - textConnection(output, w)
options(echo=FALSE)
sink(con)
addTaskCallback( function(expr, out, err, vis) {
sink()
close(con)
if(vis) {
cat(paste(#, output, collapse=\n), \n)
}
con - textConnection(output, w)
sink(con)
TRUE
})
3+4
Thanks Greg, this is great! Regards, Marcus
On 2013-03-02, at 19:06 , Greg Snow wrote:
Try the following to see if it does what you want:
## init
con - textConnection(output, w)
options(echo=FALSE)
sink(con)
addTaskCallback( function(expr, out, err, vis) {
sink()
4 matches
Mail list logo