[R] library(fields) world shift function not working anymore

2004-11-29 Thread Jenny Fox
Hi there.

I just upgraded to 2.01 on Mac OS 10.3.6.  I used to use the command 
(on R 1.9.x):

world(ylim=c(-30,30), xlim = c(0,360), shift=TRUE, add=TRUE)

to draw a world outline over my image plots.  My data uses longitude 
from (0, 360) so I need to use the shift function.  After I upgraded, I 
get the following error:

  world(ylim=c(-30,30), xlim = c(0,360), shift=TRUE, add=TRUE)
Error in world(ylim = c(-30, 30), xlim = c(0, 360), shift = TRUE, add = 
TRUE) :
NAs are not allowed in subscripted assignments

Does anyone know a workaround for this?

Thank you.

Jennifer Fox
Graduate Researcher
NOAA Aeronomy Laboratory
Boulder, CO

[EMAIL PROTECTED]
[[alternative text/enriched version deleted]]

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] library(fields) world shift function not working anymore

2004-11-29 Thread Ray Brownrigg
 I just upgraded to 2.01 on Mac OS 10.3.6.  I used to use the command 
 (on R 1.9.x):
 
 world(ylim=c(-30,30), xlim = c(0,360), shift=TRUE, add=TRUE)
 
 to draw a world outline over my image plots.  My data uses longitude 
 from (0, 360) so I need to use the shift function.  After I upgraded, I 
 get the following error:
 
   world(ylim=c(-30,30), xlim = c(0,360), shift=TRUE, add=TRUE)
 Error in world(ylim = c(-30, 30), xlim = c(0, 360), shift = TRUE, add = 
 TRUE) :
   NAs are not allowed in subscripted assignments
 
 Does anyone know a workaround for this?
 
Well, a workaround would be:
library(maps)
map(world2, ylim=c(-30,30), xlim = c(0,360), add = TRUE)

(at least until fields is updated).

CHANGES IN R VERSION 2.0.0

o   Subassignments involving NAs and with a replacement value of
length  1 are now disallowed.  (They were handled
inconsistently in R  2.0.0, see PR#7210.)  For data frames
they are disallowed altogether, even for logical matrix indices
(the only case which used to work).

Ray Brownrigg

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html