I am following code from this guidebook, https://www.adb.org/sites/default/files/publication/698091/guidebook-mapping-poverty-data-integration-ai.pdf
And inputted
wd <- tcltk::tk_choose.dir(caption ="Select Working Directory")
into R
but received the error message Error in structure(.External(.C_dotTclObjv, objv), class = "tclObj") : [tcl] invalid command name "tk_chooseDirectory".
When I changed it to wd <- tcltk::tk_chooseDirectory(caption ="Select Working Directory")
I get the error
Error: 'tk_chooseDirectory' is not an exported object from 'namespace:tcltk'
.
The only lines of code I have before these are installing packages, but since tcltk is a base package of R, it's unlikely that's the problem.
How do I solve this? Thank you! I've attached a photo of the example code.