Stop being noisy!!!
The message() function is useful for giving users an indication of how their code is running.
The function simulate() performs a Monte-Carlo simulation, with the number of simulations specified by the runs argument. The function helpfully uses message() to indicate progress.
Questo esercizio fa parte del corso
Defensive R Programming
Istruzioni dell'esercizio
- Call the
simulate()function and suppress the output usingsuppressMessages(). Store the simulations in object callsim.
Esercizio pratico interattivo
Prova a risolvere questo esercizio completando il codice di esempio.
# Suppress the standard output of the simulate() function
sim = ____(simulate(runs = 5))