Can you use terminal R commands on a Mac?

I wrote some code at school to basically generate different graphics from R, and I wanted to use it on a computer Mac.

Is there a way to use terminal commands Ron a computer Macand is there a place where I could get more information about these terminal commands Mac R?

+5
source share
2 answers

I use the "R" command with the standard loading of the R.app GUI and recommend using it instead of macports. After starting the installer, I see:

$ which R
/usr/local/bin/R

$ ls -l /usr/local/bin/R
lrwxr-xr-x  1 root  wheel  47 Nov 12  2008 /usr/local/bin/R -> /Library/Frameworks/R.framework/Resources/bin/R

$ R
R version 2.8.0 (2008-10-20)
...
> 

, GUI, (.Rhistory .RData). , , (, ).

, , Ctrl-C. GUI .

, , Mac R X11, , , . : CarbonEL, ~/.Rprofile:

goquartz = function() {
  library("CarbonEL")
  options(device='quartz')
  Sys.unsetenv("DISPLAY")
}

if (.Platform$GUI == "X11") {
  # this means we're running in the terminal (not GUI) version.
  # if you actually want the X11 display, comment out the following line
  goquartz()
}
+11

R, R Mac OS X. - R , MacPorts, :

$ sudo port install R

- R (2.9.1), MacPorts ( 2.8.1).

+2

All Articles