Open talgalili opened 7 years ago
Hi @talgalili I am glad you are glad :). I think we would do a great service to the R guys merging updateR into installR so to create one complete package useful for both windows and unix users. Could you guide me through the process? How would you proceed with the merging?
One last thing: also @RobertMyles is author of this package ( he gave me a great help indeed!) and I would therefore ask you to add him as cohautor as well.
Thanks!
Hi @AndreaCirilloAC Great :)
Suggestions for merging: 1) to start with adding the function as updateR_linux to a fork of installr 2) currently installr is limited to windows only. Check to see which errors you get on linux when trying to install installr, these functions needs to be fixed so they would be conditional on the OS 3) Once steps 1 and 2 work, the current installr::updateR will need to become installr::updateR_windows and then a new updateR will need to be written so to use one of the two depending on the OS.
How does this sound to you?
Tal
Nice idea, Tal. What do you think of separate update_windows()
, update_mac()
and update_linux(distribution = c([choices of Linux dists]))
functions? I know some Linux distributions have slightly different requirements for updating R, or at least that's my understanding (I use a mac, not Linux, so I'm not 100% sure). I know some of them are sudo apt-get update r-base
(mint, debian, ubuntu), while others have to download from CRAN, I think.
Hi @RobertMyles Sounds good. I also suspect that once an outline will be made, others will patch it to fit their own distro.
going to create the update_mac() function first leveraging the current version of updateR. we can then move to the update_linux() function.
What do you guys think about a more general function, that can encompass all of the OSs? Something like:
updateR <- function(password, system = c("Windows", "Mac", "Linux"){
sys <- match.arg(system)
... # installs based on the system type
UseRs can then choose the system with updateR(password, "Mac")
, for example.
we could even try to make it select automagically the right function based on the OS (look at the import() function to see what I mean). To see if it is feasible we only need to try to install and run the current UpdateR package on Linux. I have one machine running ubuntu. I am going to give it a try shortly and let you know.
I think it should probably be something in the lines of
updateR <- function(..., system = c("auto", "Windows", "Mac", "Linux"){
sys <- match.arg(system)
... # installs based on the system type
}
So that the ellipsis will go to whatever options are relevant to that OS (for example, Windows does not need the password argument), while the "auto" option will have the system be auto-detected. I suspect that once we have updateR available for all three OS, we'll understand better how to incorporate it into a one-size-fits-all updateR.
Ok, great. I don't have Linux here, so I'll wait til you try it, Andrea, and then we can figure out how to put it all together.
done: it doesn't work. reason is we download a .pkg file, which is explicitly designed for Mac OSs and can not immediately be opened by Linux OS. If we want to get updateR further we should look at the following pages: https://cloud.r-project.org/bin/linux/debian/ https://cloud.r-project.org/bin/linux/redhat/README https://cloud.r-project.org/bin/linux/suse/ https://cloud.r-project.org/bin/linux/ubuntu/README.html
we could even just start with Ubuntu, which is, as far as I know, the most popular one.
@AndreaCirilloAC This makes sense to me. I think taking care of ubuntu would probably be enough. Once it is done, people who are using the other distros would probably suggest PR which will be based on how you would do it.
But this all sounds doable, and also useful :)
Tal
I have some friends who use Linux, and according to them, R updates itself automatically in Ubuntu, so perhaps it's not worth adding Linux functions, what do you guys think?
I would check it more precisely (I suspect this depends on a repo which is external to CRAN). But either way - we can start with adding Mac OS and move from there.
Hi @AndreaCirilloAC I'm glad to see you've made this package. Would you be interested in merging this into installr? (if so, I'll add you as a co-author and give you the relevant privileges).
With regards, Tal