I need to write a small R script for people who never used R before that imports a file and does some things with it. I would like to minimize user input as much as possible, and since assigning the file-path is basically all the user input required I was wondering, is it possible to get a popup screen (basically your usual "open file" screen) allowing someone to select a file (import the name as string in R or something)?
相关问题
- R - Quantstart: Testing Strategy on Multiple Equit
- Using predict with svyglm
- What is the best way to do a search in a large fil
- Reshape matrix by rows
- Extract P-Values from Dunnett Test into a Table by
相关文章
- How to convert summary output to a data frame?
- How to plot smoother curves in R
- Paste all possible diagonals of an n*n matrix or d
- ess-rdired: I get this error “no ESS process is as
- How to use doMC under Windows or alternative paral
- dyLimit for limited time in Dygraphs
- Saving state of Shiny app to be restored later
- What is the correct way to declare and use a FILE
The tcltk package gives you tk_choose.files.
If you want to go beyond file choosers then you can use the package to build user interfaces.
The
file.choose
function performs this, eg:You may also want to look at
choose.files
(for multiple files) andchoose.dir
(for just selecting a directory path).It's worth mentioning
rChoiceDialogs::rchoose.files
. I'm not completely sold yet, but they advertise it as being completely cross platform and fixing the annoying problem common tochoose.files
andtk_choose.files
of popping up behind other windows. See their vignette here.