[R] pass longer arguments to adj of text()

2008-10-20 Thread Thomas Steiner
Hi,

text()'s pos does handle more dimensional labels, while adj does not -
or how can I pass an array to text() and use the adj argument (skyblue
text)?

plot(-1:1,-1:1)
text(c(0,0),c(0,0),c(a,b),pos=c(1,2),col=red)
text(c(0,0),c(0,0),c(a,b),adj=cbind(c(1,2),c(1,1)),col=skyblue)

Thomas

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] pass longer arguments to adj of text()

2008-10-20 Thread Thomas Steiner
...and the offset argument can't handle arrays either:

text(c(0,0),c(0,0),c(a,b),pos=c(1,2),offset=c(1,0.5),col=darkgreen)

The second argument does not have any effect.
Can I pass arrays to text and use diffent locations?
Thomas

PS: I use R version 2.5.0 (2007-04-23) under Win2000.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] pass longer arguments to adj of text()

2008-10-20 Thread Thomas Steiner
Brian, thank you for your reply.

 Why do you expect this to be vectorized when the help page clearly says
 otherwise?

Sure, it's in line with the help, no problem there. I just asked if
this feature is somehow possible.
I expected it, because pos does take arrays and it overrides any
adj value given (see help). So if pos does, why not adj?

 What is wrong with two or more text() calls?

it's quicker and more beautiful.
See my code at the end (last loop) of
http://commons.wikimedia.org/wiki/Image:Sonnenstand.png

Thomas

 NB: library(fortunes); fortune(WTFM) applies.

This one I didn't get. They help to do it without a loop?

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] pass longer arguments to adj of text()

2008-10-20 Thread Peter Dalgaard

Thomas Steiner wrote:


NB: library(fortunes); fortune(WTFM) applies.


This one I didn't get. They help to do it without a loop?


No.

 library(fortunes); fortune(WTFM)

This is all documented in TFM. Those who WTFM don't want to have to WTFM 
again

on the mailing list. RTFM.
   -- Barry Rowlingson
  R-help (October 2003)

(TFM == The Friggin' Manual (or thereabouts), W==Write, R==Read)

--
   O__   Peter Dalgaard Ă˜ster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark  Ph:  (+45) 35327918
~~ - ([EMAIL PROTECTED])  FAX: (+45) 35327907

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.