When I use file.choose
or choose.files
to select a file, the dialogue window shows folder icons but no text.
This problem did not occur previously. I did update RStudio not too long ago, but I am not sure if that is the cause. I am currently using R 4.1.1 and RStudio 2023.03.0 Build 386.
file.choose
is in base and choose.files
is in utils, so they should both be up to date. I see this behavior even in a new R process with no additional packages loaded, so I know that I am calling the functions in base R.
As no one has yet answered this question by putting the working solutions in an answer instead of a comment, I will copy some and add more possible solutions for @Faemaika who seems to have the same problem, but for who the stated solutions do not help.
Firstly, as Mikael Jagan stated, try running base::file.choose()
from the command line, rather than from RStudio.
If this works well, try upgrading R to the latest version. It should be at least 4.3.0, but at the moment of writing we are in R 4.3.1 for which it should work too. Then, file.choose
and choose.files
are up to date enough.
Secondly, if this does not work, open the app 'file explorer' and keep it open while using the file.choose
function in RStudio.
Thirdly, if the problem still persists, check if your RStudio file chooser is currently located to a path which is accessible. If you last opened a file to which the path is now depricated, the file chooser might struggle with opening any path at all. You can solve this by manually opening a random file by using Ctrl + O
and clicking some random file. Then retry file.choose
.
Fourthly, you might consider to reboot your pc/RStudio. This may work only after multiple times; do not give up too soon.
Good luck!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With