# NOT RUN {
## Print a couple of cute messages when R exits.
helloWorld <- function() cat("\nHello World!\n")
byeWorld <- function() cat("\nGoodbye World!\n")
.Last <- lastAdd(byeWorld)
.Last <- lastAdd(helloWorld)
# }
# NOT RUN {
q("no")
## Should yield:
##
## Save workspace image? [y/n/c]: n
##
## Hello World!
##
## Goodbye World!
##
## Process R finished at Tue Nov 22 10:28:55 2005
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab