Questions tagged [rprofile]

The R statistical package uses both or either Rprofile.site or .Rprofile to load startup requirements.

The R statistical package uses both or either Rprofile.site or .Rprofile to load startup requirements. .Rprofile instances may be multiple and can be directory/project specific.

62 questions
0
votes
1 answer

Setting R's default behaviour in .Rprofile and .Renviron. Understanding what to do where

I am trying to understand the use of the files .Renviron and .Rprofile. If I understand correctly, the .Rprofile is sort of a startup script, sourced as R code, that sets the options and environment variables that a user may want either all the…
Pål Bjartan
  • 793
  • 1
  • 6
  • 18
0
votes
0 answers

Problems with using default() in .Rprofile

Most of the libraries I use in R are installed via the OS (i.e. using apt install r-cran-* which are installed in /usr/lib/R/*). Unfortuntaely, when using update.libraries() within a session offers to update these packages'm trying to have R only…
mikemtnbikes
  • 393
  • 2
  • 11
0
votes
0 answers

RStudio: Running .Rprofile in source file location

I have set up a workflow governed by a Makefile. Under code/ I have multiple *.r scripts each typically responsible for creating one output file (typically an RData file but could also be csv exports or png images, any file in…
Sirius
  • 5,224
  • 2
  • 14
  • 21
0
votes
0 answers

How to configure theme editor and default encoding in .Rprofile

I want to configure my .Rprofile in order to : Apply the editor theme in RStudio to "Idle fingers" Set default encoding for source files to "UTF-8" I don't want to use RStudio menus to do this What I tried…
Damien Dotta
  • 771
  • 3
  • 13
0
votes
1 answer

.rprofile not source when creating RStudio project

In Windows 7, I have my .Rprofile in a custom location (not R_HOME, not HOME). I informed the OS of this location via the user environment variable R_ENVIRON_USER pointing to this location. There is no other .Rprofile anywhere else. In RStudio, I…
Thomas Speidel
  • 1,369
  • 1
  • 14
  • 26
0
votes
0 answers

RGui loads outdated .Rprofile due to .RData in working directory

I recently adapted my .Rprofile and was puzzled when RGui did not load the new .Rprofile (RStudio did load it) but instead held on to the old version. After some trial and error I figured out that the .RData-file in the working directory was the…
gianni
  • 181
  • 1
  • 5
0
votes
1 answer

Error in assign(".popath", popath, .BaseNamespaceEnv) : cannot change value of locked binding for '.popath'

I'm a new R user, and I've changed the default path of library package for my convenience, but I ended up getting the the error every time I start Rstudio: "Error in assign(".popath", popath, .BaseNamespaceEnv) : cannot change value of locked…
jojo
  • 1
  • 1
0
votes
3 answers

Setting proxy on .Rprofile on OSX fails

In order to access CRAN packages from within R on OSX I've been using Sys.setenv(http_proxy="http://blah_blah:1234/") as the first command in the R GUI for a while, but would really like to set this proxy automatically. I've tried unsuccessfully to…
R_usr
  • 75
  • 5
0
votes
1 answer

Shiny app can't access data if runApp is run from a .Rprofile

I built a Shiny app that makes use of a list variable (for label customization) that is created from an excel file. The name of this variable is refvar refvar is created into shinyServer() in server.R and is used to build UI elements that are sent…
Bakaburg
  • 3,165
  • 4
  • 32
  • 64
0
votes
1 answer

Rprofile.site not found by R on Startup in macos

Problem R cannot detect the presence of "Rprofile.site" file in home directory's /etc folder despite it being there. Investigation Since the Rprofile.site lives in the home directory as /etc/Rprofile.site. I checked the home directory using…
Robert Tan
  • 634
  • 1
  • 8
  • 21
0
votes
1 answer

updating both Rprofile and R to the same version

Is there any idea, how I can find the version of my Rscript? The issue is, once I am running R in mac terminal, the version is 3.2.2 but running via Rscript the version is changed to 3.0.2. I would like to know how to update my Rscript's version!
Soheil
  • 193
  • 4
  • 10
0
votes
1 answer

How do I set my default editor to emacs -nw in my .Rprofile?

As the question says, I want my default editor in R (e.g. when I do fix(fn_name)) to be the non-windowed mode of emacs as opposed to the windowed mode. Is there any way to do this?
Mukund
  • 3
  • 2
0
votes
1 answer

functions in .Rprofile are not found with are in .env

I have a .Rprofile I have copied from https://www.r-bloggers.com/fun-with-rprofile-and-customizing-r-startup/ However, when I load my R session the functions that are in env$ they don't work and the functions not in env works perfectly, here is an…
user2380782
  • 1,542
  • 4
  • 22
  • 60
0
votes
1 answer

move Rprofile from one computer to another

I am trying to put a copy of my Rprofile from my work computer onto my home computer, but R does not seem to be able to find it. I have tried several responses to similar questions including: In Windows, you set the R_USER profile by opening up a…
user41509
  • 978
  • 1
  • 10
  • 31
0
votes
0 answers

How to use .first() function in R in .Rdata mode

I'm trying to customize my R setup. I understood the part where we can put our functions(.First/Last) in Rprofile.site or .Rprofile. but I want to take .Rdata route. As I understand that if I have a .First/.Last function in any of the .R file in my…
Chirayu Chamoli
  • 2,076
  • 1
  • 17
  • 32