[R] curvedarrow (some graphics problem)

David Winsemius dwinsemius at comcast.net
Wed Jun 24 14:35:14 CEST 2009


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




More information about the R-help mailing list