[R] Working with and without formula in function

2009-04-03 Thread dogle
I am attempting to write a function that is flexible enough to respond to the user providing a formula (with a data= argument) or not (similar to plot(x,y) versus plot(y~x,data=data)). I have found a method to work with this in a simple case but am having trouble determining how to find a

[R] Simple R (in Sweave) Question

2008-11-02 Thread dogle
I am writing a report using Sweave with specific R output incorporated into the text using the Sexpr{} command. I have run into two specific issues: 1) If the result inside the Sexpr{} command is an integer less than 10 I would like to print the “word” for that number – e.g., “seven” for 7. 2)

Re: [R] Automatic placement of Legends

2008-07-08 Thread dogle
You may be able to use the coordinates returned from emptyspace() in plotrix package as coordinates for the legend in legend(). tolga.i.uzuner wrote: ... I am looking for a way to get legends placed automagically in an empty spot on a graph. Additional complication comes through my useage