[R-sig-Geo] Bug in Rgshhs? - can not only set xlim (requires ylim)

Torleif Markussen Lunde torleif.lunde at cih.uib.no
Fri Feb 27 17:02:25 CET 2009


Hi

If I am not wrong there is a small bug in Rgshhs in Maptools. When defining 
only xlim (not ylim) an error message is returned:
"Error in polys[[which(chosen_0 == (Antarctica - 1))]] :
  attempt to select less than one element"

Is this a bug or a feature?

In any case. I did some modifications to Rgshhs. It fixes the bug(?) and 
handles shifting slightly different. However the modified Rgshhs does not 
accept upper xlim 180 > xlim > 190. Did not figure out why yet. I am sorry if 
the modification is dirty. The function is slower (x 2) when shifting is 
involved.

The modified version (Rgshhsn) can be found at:
http://open.uib.no/R/Rgshhs3-tmp.r

Best wishes
Torleif



More information about the R-sig-Geo mailing list