# NOT RUN {
eval.msgs('1:5')
eval.msgs('x <- 1:5')
eval.msgs('lm(mtcars$hp ~ mtcars$wt)')
## plots
eval.msgs('plot(runif(100))')
eval.msgs('histogram(runif(100))')
## error handling
eval.msgs('runiff(23)')
eval.msgs('runif is a nice function')
eval.msgs('no.R.object.like.that')
## messages
eval.msgs(c('message("FOO")', '1:2'))
eval.msgs(c('warning("FOO")', '1:2'))
eval.msgs(c('message("FOO");message("FOO");warning("FOO")', '1:2'))
eval.msgs('warning("d");warning("f");1')
## stdout
eval.msgs('cat("writing to console")')
eval.msgs('cat("writing to console");1:4')
# }
Run the code above in your browser using DataLab