Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding a dialogue to install a new (or updated?) R package #5601

Closed
rdstern opened this issue Nov 30, 2019 · 2 comments · Fixed by #5645
Closed

Adding a dialogue to install a new (or updated?) R package #5601

rdstern opened this issue Nov 30, 2019 · 2 comments · Fixed by #5645
Assignees
Milestone

Comments

@rdstern
Copy link
Collaborator

rdstern commented Nov 30, 2019

This is (sort of) just the install.packages("xxx") command and I use this quite often from the script window.
Could we have a simple dialogue to do this. It could be a new Packages tab in the Tools > Options dialogue.
The R code isn't trivial because it would be good if:
a) It checks first if the package has already been installed.
b) It checks if the package exists - could be a typing error in the name of the package.
This is discussed in stack-overflow for example here.

@rdstern
Copy link
Collaborator Author

rdstern commented Jan 29, 2020

@Ivanluv That's great. It works already!

  1. Could the menu option be called "Load R Package". And could it be above the Options item - so the Options stays last.
  2. I checked lots of different things and really like the check field. When the package is already installed it said: "Package is installed. Newer version available: 0.1.2 (current: 0.1.1)." The text doesn't quite fit into the field. Could you make that just a bit wider - even to the end of the current dialogue. It is close.
  3. Then I tried to install a new package. I chose one called see. It asks what mirror to install from. I guess that's useful, but I don't think that RSudio asks that. Could one be chosen? Then it gives a list of all the packages, rather than just installing.
    a) When I have given the package name, then it should proceed automatically with that installation.
    b) An additional feature could be to suggest this option. This could either be keeping the dialogue as now - when no package is given then Check is correctly disabled. But you could enable Ok and Script and then it would proceed.
    Or you could have radio buttons. Give Package and Choose from List.
  4. I added the item to the help file. The help context number is 592.

@dannyparsons
Copy link
Contributor

  1. That should be "Install R Package". Load has a separate meaning in R (when you do library(zoo) you are "loading" the zoo package).

  2. @Ivanluv you can fix the repo in the install.packages() command (as we did in available.packages()) so that it does not ask to choose the mirror site.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants