[R] par specification inside formula vs. outside function cal l

Liaw, Andy andy_liaw at merck.com
Fri Jun 11 20:01:12 CEST 2004


> From: Peter Flom
> 
> The other day I asked a question about changing the size of 
> axis labels
> in a dotchart.  Chuck Cleland provided the answer, which was 
> to specify
> 
> par(cex.axis = .8)
> outside the call to dotchart
> 
> I had tried this inside the formula, and it did nothing (nor did it
> produce an error).  
> 
> I was wondering when it is necessary to specify things outside versus.
> inside a call to a function

My guess is that the fourth line from the bottom of dotchart():

    axis(1)
 
which does not contain "...", so any graphical parameters you set through
arguments to dotchart() would not have any effect on the x-axis.  You can
create a copy of dotchart (say dotchart2) that has

    axis(1, ...)

instead, and I believe that will work.

Andy

 
> Thanks
> 
> Peter
> 
> Peter L. Flom, PhD
> Assistant Director, Statistics and Data Analysis Core
> Center for Drug Use and HIV Research
> National Development and Research Institutes
> 71 W. 23rd St
> www.peterflom.com
> New York, NY 10010
> (212) 845-4485 (voice)
> (917) 438-0894 (fax)
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! 
> http://www.R-project.org/posting-guide.html
> 
>




More information about the R-help mailing list