I am learning how to Develop GUI with R and found this nice tutorial.
library(tcltk2)
win3 <- tk2toplevel(title = "Tk2 window", manage = "grid", padx = 70, pady = 30)
win3$butOK <- tk2button(text = "OK", width = -6, command = TkCmd_destroy(parent))
However, the given code throws the following error:
Error in tk2toplevel(title = "Tk2 window", manage = "grid", padx = 70, : could not find function "tk2toplevel"
I looked the tcltk2
documentation and could not find the function tk2toplevel
. I wonder if this function is coming from some other package.