On Jun 24, 2009, at 1:21 AM, casperyc wrote:


[quote]>  grid.text("t", x=0.3, y=unit(-1, "line"), vp=vp2)
Error in valid.units(units) : Invalid unit
grid.text("s", 0.8, unit(-1, "line"), gp=gpar(col="red"), vp=vp2)
Error in valid.units(units) : Invalid unit[/quote]

Hi,

I have loaded the [grid] package. It seems that I have to load another
package?

No. Such a need might have been suggested by a function not found error. In this case the details are in the help page for the unit function in grid. The unit parameter was mis-specified.

?unit

Try:

 grid.text("t", x=0.3, y=unit(-1, "lines"), vp=vp2)
--
 grid.text("s", 0.8, unit(-1, "lines"), gp=gpar(col="red"), vp=vp2)


David Winsemius, MD
Heritage Laboratories
West Hartford, CT

______________________________________________
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.

Reply via email to