Re: [R] Tables in legend

2009-02-09 Thread Vemuri, Aparna
can share any ideas on how to do this. -Original Message- From: jim holtman [mailto:jholt...@gmail.com] Sent: Friday, February 06, 2009 4:52 PM To: Vemuri, Aparna Cc: r-help@r-project.org Subject: Re: [R] Tables in legend This will probably do what you need: plot(1)

Re: [R] Tables in legend

2009-02-06 Thread jim holtman
This will probably do what you need: plot(1) x <- 1:10 # numbers for the legend blah <- LETTERS[1:5] legendData <- character(5) for (i in 1:5) legendData[i] <- sprintf("Blah-%s %d %d", blah[i], x[2*i - 1], x[2*i]) legend('topright', legend=legendData) On Fri, Feb 6, 2009 at 6:57 PM, Vemuri,

[R] Tables in legend

2009-02-06 Thread Vemuri, Aparna
I need to create a legend for a simple scatter plot in the following format. This is Blah1 number1 number2 This is Blah2 number3 number4 . . . This is Blah6 number11number12 I looked up these help pages and found the following solution. lStr<-c(Blah1, Blah2,Blah6, number 1,