I would like to display a pop-up warning that the code just ran.
The only script I have, below, is what opens a command window.
system('CMD /C "ECHO O seu script chegou ao fim! && PAUSE"',
invisible=FALSE, wait=FALSE)
I would like to display a pop-up warning that the code just ran.
The only script I have, below, is what opens a command window.
system('CMD /C "ECHO O seu script chegou ao fim! && PAUSE"',
invisible=FALSE, wait=FALSE)
Well, your answer is a possibility.
Another and use the package rpanel . For this, you will need to have tcl / tk and the BWidget package installed. Then, inside the% w_ of%, do:
install.packages("rpanel")
Now you can do something like:
rp.messagebox("Popup usando rpanel", title="Titulo criativo")
That on my pc will generate the following window:
Detail that this popup will block the session.
Another solution is to use the tcltk package. This package is already installed in R, although it does not appear in the list of CRAN packages.
require(tcltk)
tkmessageBox(title = 'Exemplo tcltk', message = 'Operação concluída!', type = 'ok')
As with the rpanel package, the session will be blocked. If you do not want to block, use a progressbar, from the utils package.
invisible(winProgressBar(title = "Concluido!", label = "Operação concluída!", initial = 1))
If the goal is to get attention, you can also use alarm()
to make a sound.