ncss-tech / soilReports

An R package that assists with the setup and operation of a collection of soil data summary, comparison, and evaluation reports. These reports are primarily used by USDA-NRCS soil scientists in both initial and update mapping.
15 stars 5 forks source link

Update `installRprofile()` #114

Closed brownag closed 2 years ago

brownag commented 2 years ago

I noticed that after some recent reconfiguration the Sys.getenv("USERNAME") call we have been using in the .Rprofile returns "".

I have replaced that call with Sys.info()['user'] which should be more reliable.

dylanbeaudette commented 2 years ago

Thanks. That could have been bad

brownag commented 2 years ago

I suspect we could see people running into problems with this if it is more than just a fluke that that env variable is not defined on my system. Symptoms will include suddenly appearing like no packages are installed because personal lib cannot be found. Fixing it may require manually removing the existing .Rprofile from the network drive that redirects to local.

brownag commented 2 years ago

Warnings about not being able to create directory e.g. "C:/Users//Documents" due to insufficient permissions will also pop up