Dear Paul and others,
Thanks for the quick response.
2009/9/25 Paul Murrell p.murr...@auckland.ac.nz:
Hi
The bit you found that says ...
# Write [-.unit methods too ??
... is the crucial bit.
When I figured that, I had already written up my email so I thought
I'd ask anyway from a naive
Further to my previous message, I just dug this in lattice/R/layout.R :
rearrangeUnit - function(x, pos, u)
{
lx - length(x)
if (lx == 1)
u
else if (pos == 1)
unit.c(u, x[(pos+1):lx])
else if (pos == lx)
unit.c(x[1:(pos-1)], u)
else
Dear list,
Consider the following,
library(grid)
w = unit.c(unit(1, in), unit(2, in))
w2 = w + unit(1, mm)
w[2] - 0
w2[2] - 0
convertUnit(w, mm)
#[1] 25.4mm 0mm
convertUnit(w2, mm)
#Error in grid.Call(L_convert, x, as.integer(whatfrom),
as.integer(whatto), :
# INTEGER() can only be applied
Hi
The bit you found that says ...
# Write [-.unit methods too ??
... is the crucial bit.
Would it be possible to add such a method?
Almost certainly, it just needs someone to repeatedly bug the person who
can make the change :) Thanks for the suggestion for code BTW; I'll
take a look