Re: [R] pass longer arguments to adj of text()
...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()
Why do you expect this to be vectorized when the help page clearly says otherwise? See adj: one or two values in [0,1] which specify the x (and optionally y) adjustment of the labels. On most devices values outside that interval will also work. What is wrong with two or more text() calls? NB: library(fortunes); fortune("WTFM") applies. On Mon, 20 Oct 2008, Thomas Steiner wrote: 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 -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ 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()
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()
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.
Re: [R] pass longer arguments to adj of text()
On Mon, 20 Oct 2008, Thomas Steiner wrote: 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 Perhaps mapply( text, px, py, angle2date(jp), adj=adj, MoreArgs=list(cex=0.85)) is more to your liking? HTH, Chuck 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. Charles C. Berry(858) 534-2098 Dept of Family/Preventive Medicine E mailto:[EMAIL PROTECTED] UC San Diego http://famprevmed.ucsd.edu/faculty/cberry/ La Jolla, San Diego 92093-0901 __ 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.