简体   繁体   中英

R - How to make choose.dir() use windows file explorer like choose.files( )

I'm working on a project where I need to build functions where users select the input file with choose.files( ) and select an output folder. I've been trying to use choose.dir( ) to do the folder selection. The main issue I have is that I need them to be able to select a synced sharepoint folder for an output. Choose.file( ) open windows file explorer which i can select the synced folders, meaning getting the data is fine.

However, choose.dir( ) opens the R Browse for Folder explorer which doesn't seem able to view these synced folders. Is there a method for making choose.dir( ) use the windows file explorer in the same way as choose.files( ) or are there other method for choosing a directory which the user might be able to "see" the synced sharepoint folders?

Key information from session info which might help:

sessionInfo()

R version 3.5.1 (2018-07-02)

Platform: x86_64-w64-mingw32/x64 (64-bit)

Running under: Windows >= 8 x64 (build 9200)

An alternative would be:

tcltk::tk_choose.dir()

Also perhaps look into the rChoiceDialogs package.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM