Enabling selectFile() and selectDirectory() outside RStudio

Open
#191 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
r
Domain
api

Research direction

Start by reading the existing selectFile() and selectDirectory() entry points and comparing their behavior with utils::choose.files(), utils::choose.dir(), and base::file.choose(). Clarify the intended package and cross-platform behavior, including multiple-file selection; done means the requested functions work outside RStudio with documented behavior.

Written by the indexing model from the issue text.

Description

Hello, I would like to ask if the functions selectFile() and selectDirectory() could be made available in base R.

You have done a wonderful job with these functions and I think they could be more beneficial to the R community if they were available in a more generic package like R.utils without the need to have RStudio running.

The functions utils::choose.files and utils::choose.dir act similar to yours, but they are only supported in Windows. The only similar cross-platform function in base R seems to be base::file.choose() which does not allow to select directories and is less customisable than your function.

Also, a tweak that you could do is allow to select multiple files in selectFile().

Thanks for your time (and great work)!

Dominant language
R
Stars
175
Forks
37
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from rstudio/rstudioapi

All issues in rstudio/rstudioapi

Similar issues

More R issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.