setOutputLevel(OL$Warning)
output(OL$Info, "Test message") # no output
setOutputLevel(OL$Info)
output(OL$Info, "Test message") # prints the message
flag(OL$Warning, "Test warning") # no output
reportFlags() # prints the message
x <- output(OL$Question, "What is 2+2?")
output(OL$Info, ifelse(as.numeric(x)==4,"Correct!","Wrong"))
Run the code above in your browser using DataLab