[R-users] making a grid (fields?)

Eric Gilleland ericg@cgd.ucar.edu
Thu, 15 May 2003 16:48:09 -0600 (MDT)


Matt,

Try (from the fields package),

xy <- cbind( i.x, i.y)
foo <- as.image( ice, x=xy)
image.plot( foo)

That should work.  If it doesn't, see the help file for 'as.image' as it is
designed to do what you describe.

Eric Gilleland

----------------------------------------
National Center for Atmospheric Research
----------------------------------------
				::
CG1-3244 : (303) 497-1717	::::	::
FL1-2144d: (303) 497-2849	::::::	:::  :
				:::::::::::::::
http://www.cgd.ucar.edu/~ericg	::::::::::::::::

On Thu, 15 May 2003, Matt Pocernich wrote:

> Hi,
>
> I was wondering if there is an easy way to do the following with the
> fields package.  I have the following data from an icing model (see data
> below).  I would like to plot i.x by i.y, with the cells shaded to reflect
> the maximum values of i.ice (on a [0,1] scale.  I would like the surface
> not to be kriged, but rather the have the cells visible.  Any thoughts if
> I should be looking in the fields library?
>
> Thanks,
>
> Matt
>
>    i.x  i.y i.z        ice
> 1  108  62  10         0
> 2  108  62  11         0
> 3  108  62  12         0
> 4  108  62  13         0.13
> 5  108  62  14         0
> 6  108  62  15         0
> 7  108  62  16         0.8
> 8  108  62  17         0
> 9  108  62  18         0
> 10 108  62  19         0.3
>
> Matt Pocernich
> NCAR - Research Applications Program
> 303-497-8312
>
> _______________________________________________
> R-users mailing list
> R-users@ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/r-users
>
>