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