[R-SIG-Mac] two small problems, OSX 10.4.7

Simon Urbanek simon.urbanek at r-project.org
Tue Oct 24 20:51:10 CEST 2006


Heather,

On Oct 24, 2006, at 2:16 PM, Heather Coiner wrote:

> I'm a new user of R and UNIX--i apologize if the questions are  
> naive...
>

Please consider reading the documentation - your questions are  
answered there (see R FAQ and R for Mac FAQ).


> a) A command like plot(rnorm(1000)) responds in GUI R.app but not  
> in the command-line version.
>

The command-line version uses PostScript output by default, so the  
resulting plot will be in a file instead (Rplots.ps by default). Note  
that you need to use dev.off() to save the file (see R documentation  
for details).

If you want another, interactive plot device, you can use X11 (you  
must install it from Apple's DVD first as it is not installed by  
default) - start X11 (in Applications/Utilities) and type R there.  
However, in most cases you probably want to use the GUI instead.


> b) I downloaded a package from the internet, but R can't find it.    
> Which directory does it need to be in for R to be able to access it?
>

It is easier to install the package that to download it manually,  
because the latter is more error-prone. Either use install.packages  
command in R or simply start the R GUI, select "Packages & Data" and  
"Package Installer", then click on "Get List" to receive the package  
list, select packages and click on "Install Selected". If you want to  
install packages manually, please note that there are different kinds  
of packages (source vs binary) and the former need additional tools  
installed before you can proceed. Again, this is all described in the  
documentation.

Cheers,
Simon



More information about the R-SIG-Mac mailing list