USGS-R / wateRuse

Moved to: https://code.usgs.gov/water/water-use/wateruse
https://code.usgs.gov/water/water-use/wateruse
Creative Commons Zero v1.0 Universal
7 stars 11 forks source link

Upgrading version of R #137

Closed rwdudley-usgs closed 8 years ago

rwdudley-usgs commented 8 years ago

I'd like to hear how others have handled upgrading their version of R. For example, I tried upgrading, but then I couldn't install packages like smwrBase which is critical to many of my scripts. How do you deal with this? I would also appreciate being pointed to a website or set of instructions for the 'best' SOP to go about upgrading (maybe USGS-R group has something posted somewhere?).

Maybe not appropriate to post this under Issues, but I'm interested in everyone's input and also figured we could benefit from responses and possibly add the material to the wiki page.

ldecicco-USGS commented 8 years ago

Can you paste the error message you see for the smwrBase installation?

Most people in my office had no issues upgrading to 3.3. I had two conflicting curl packages, but once I deleted those and re-installed, things were fine.

jordansread commented 8 years ago

This is a good question and probably worth an email on the r list serve. Do you subscribe to that? Perhaps we could offer some instructions on the switch.

rwdudley-usgs commented 8 years ago

@ldecicco-USGS I had tried an upgrade a little while back to 3.2.5 and I got the message:

Warning in install.packages :
  package ‘smwrBase’ is not available (for R version 3.2.5)

And it wouldn't install. Maybe there is a setting I can change to force an install anyway?

@jread-usgs As far as I know, I don't subscribe to that. How would I do that?

ldecicco-USGS commented 8 years ago

Are you sure that you have the "GRAN" repo on your Rprofile? Usually that sticks around in an upgrade, but maybe if the old version of R was wiped out somehow...the Rprofile could have been deleted?

Try pasting this in R:

rprofile_path = file.path(Sys.getenv("HOME"), ".Rprofile")
write('\noptions(repos=c(getOption(\'repos\'),
    CRAN=\'https://cloud.r-project.org\',
    USGS=\'http://owi.usgs.gov/R\'))\n',
      rprofile_path, 
      append =  TRUE)

cat('Your Rprofile has been updated to include GRAN.
    Please restart R for changes to take effect.')

RESTART R (close RStudio, open it again)

Then:

install.packages("smwrBase")
ldecicco-USGS commented 8 years ago

Email list sign up is:

Join the USGS R-User email list. This list will be used for announcements such as training opportunities and package developments. Email: krogers@usgs.gov.

Taken from: http://owi.usgs.gov/R/contact_contribute.html

rwdudley-usgs commented 8 years ago

Thanks for the feedback.

Looks like I may already be on that list if it's the same as gs-w_r_users@usgs.gov.

I'll give that GRAN code a try when I get some time to make another upgrade attempt (in the meantime, I reverted to my old version).

dblodgett-usgs commented 8 years ago

We are good here. Discussion closed for now.