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.
I agree with you;
tk2toplevel
is not available intcltk2
and in any other package.This is very strange.
In the help
?tk2widgets
this function was never mentioned and the examples contained in this help suggest to use: