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

[BUGZILLA #15940] Rprofile file not read under MAC OS 10.9.4 #5423

Open
MichaelChirico opened this issue May 18, 2020 · 4 comments
Open

[BUGZILLA #15940] Rprofile file not read under MAC OS 10.9.4 #5423

MichaelChirico opened this issue May 18, 2020 · 4 comments

Comments

@MichaelChirico
Copy link
Owner

i,

I've installed R in a math computer classroom and need a method to automatically load additional packages beyond the default packages:

  1. The package manager does not remember checked packages to load between sessions.

  2. Also, R does not seem to read the .Rprofile file located in a user's home directory when R starts. Thus, R does not read and execute a .First function.

  3. I've also tried to use an Rprofile.site file in the subdirectory etc but
    that does not seem to be read either!

In short their does not seem to be a way to change the default packages
that are loaded when R starts under Mac OS 10.9.4.

Regards,

Adam Hausknecht
Department of Mathematics
UMass Dartmouth


METADATA

  • Bug author - Adam Hausknecht
  • Creation time - 2014-08-19 16:56:21 UTC
  • Bugzilla link
  • Status - UNCONFIRMED
  • Alias - None
  • Component - Startup
  • Version - R 3.1.1
  • Hardware - x86_64/x64/amd64 (64-bit) OS X Mavericks
  • Importance - P5 major
  • Assignee - R-core
  • URL -
  • Modification time - 2014-08-21 17:27 UTC
@MichaelChirico
Copy link
Owner Author

This works for me. Looks like at least your analysis is wrong; .Rprofile is read and run.

R version 3.1.1 (2014-07-10) -- "Sock it to Me"
Copyright (C) 2014 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin13.1.0 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

[1] "Hi!"
[R.app GUI 1.65 (6784) x86_64-apple-darwin13.1.0]

system("cat ~/.Rprofile")

print("Hi!")



METADATA

  • Comment author - Peter Dalgaard
  • Timestamp - 2014-08-19 17:33:00 UTC

@MichaelChirico
Copy link
Owner Author

(In reply to Peter Dalgaard from comment #1)

This works for me. Looks like at least your analysis is wrong; .Rprofile
_is_ read and run. 

R version 3.1.1 (2014-07-10) -- "Sock it to Me"
Copyright (C) 2014 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin13.1.0 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

[1] "Hi!"
[R.app GUI 1.65 (6784) x86_64-apple-darwin13.1.0]

> system("cat ~/.Rprofile")
print("Hi!")
>

Dear Peter Dagaard,

Thanks for your quick response!

Here is the output from my MacBook Pro running Mac OS 10.9.4:

-----------------------------------------------------------------------------------
R version 3.1.1 (2014-07-10) -- "Sock it to Me"
Copyright (C) 2014 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin13.1.0 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

[R.app GUI 1.65 (6784) x86_64-apple-darwin13.1.0]

[Workspace restored from /Users/ahausknecht/.RData]
[History restored from /Users/ahausknecht/.Rapp.history]

system("cat ~/.Rprofile")

print("Hi")


---------------------------------------------------------------------------------------

As you can see the line

[1] Hi!

is missing. But the Rprofile file containing the print statement is present in my home directory!

I'm not sure what to do to fix the problem!
Perhaps there is some R environment variable that is missing or is not set correctly.

Regards,

Adam Hausknecht
Department of Mathematics
UMass Dartmouth


METADATA

  • Comment author - Adam Hausknecht
  • Timestamp - 2014-08-20 14:01:54 UTC

@MichaelChirico
Copy link
Owner Author

Please check your preferences - R.app allows you to override the startup directory which would also override the location of .Rprofile. If it doubt, you can reset your preferences to the default settings by renaming or deleting Library/Preferences/org.R-project.R.plist


METADATA

  • Comment author - Simon Urbanek
  • Timestamp - 2014-08-20 14:16:17 UTC

@MichaelChirico
Copy link
Owner Author

Hm, the workspace does seem to be restored from∼/.RData so presumably the Startup dir isn't changed?

Also check the environment. Having R_PROFILE set might explain it. (No idea how that would happen, but something clearly isn't normal.)


METADATA

  • Comment author - Peter Dalgaard
  • Timestamp - 2014-08-20 18:49:48 UTC

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

No branches or pull requests

1 participant