Re: [R] Plotting numbers at a specified decimal length on a plot()

2007-09-23 Thread Marc Schwartz
On Sun, 2007-09-23 at 13:50 -0400, Matthew Dubins wrote: > Hi there, > > I want to figure out how to plot means, with 2 decimal places, of any Y > variable on a scatterplot according to any X variable (which obviously > should have limited scope). I already figured out how to plot the > means,

Re: [R] Plotting numbers at a specified decimal length on a plot()

2007-09-23 Thread P Ehlers
I find sprintf() useful for this. Compare lab <- rnorm(8) plot(1:10) text(2:9, 2:9, lab) with lab2 <- sprintf("%4.2f", lab) plot(1:10) text(2:9, 2:9, lab2) - Peter Ehlers Matthew Dubins wrote: > Hi there, > > I want to figure out how to plot means, with 2 decimal places, of any Y > variable

[R] Plotting numbers at a specified decimal length on a plot()

2007-09-23 Thread Matthew Dubins
Hi there, I want to figure out how to plot means, with 2 decimal places, of any Y variable on a scatterplot according to any X variable (which obviously should have limited scope). I already figured out how to plot the means, but without limiting their precision to 2 decimal places. This is