[R] partial match gotcha

From: Robin Hankin <r.hankin_at_noc.soton.ac.uk>
Date: Thu 20 Oct 2005 - 19:39:15 EST


Hi

The following gotcha took me a long time to catch:

f <- function(x, main0="red", ...){

   par(col.axis=main0)
   plot(x,...)
}

f(1:10,main="title here")
f(1:10,main="title here",main0="blue")

I can't quite succinctly summarize why the second case works but the first one
doesn't.

--
Robin Hankin
Uncertainty Analyst
National Oceanography Centre, Southampton
European Way, Southampton SO14 3ZH, UK
  tel  023-8059-7743

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Thu Oct 20 19:45:38 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:40:46 EST