
On 07/07/10 18:52, Paul Johnson wrote:
> [...]
> 1:
>     axis(1, line=6, at=mu+dividers*sigma,
> labels=as.expression(c(b1,b2,b3,b4,b5), padj=-1))
>
>
> 2:
>     axis(1, line=9, at=mu+dividers*sigma,
> labels=c(as.expression(b1),b2,b3,b4,b5), padj=-1)
>
> This second one shouldn't work, I think.
> It has as.expression on only the first element, and yet they all come
> out right. Is there a spill over effect?
>    

You can call it spill-over if you want: c() makes a *vector*, not a 
list, so all elements have to be of the same type and they are all 
coerced to the more general type (the first).  It is similar to

 > c("1", 2, 3)
[1] "1" "2" "3"

which is different from c(1, 2, 3).

Hope this helps

Allan

PS: BTW, I think the () are wrong in example 1? :-)


	[[alternative HTML version deleted]]

