[R] how to make a contour plot using data in long format

Maria Wang mariayzw at hotmail.com
Thu Jul 13 16:25:59 CEST 2006


Hi List,

There is a dataset with Latitude Longitude information and corresponding 
value shaped like this:
Lati                     Longi                  Value
18.0001             -159.6667             123
18.0023             -159.6665             124
19.1001             -158.2988             125
...                      ...                        ...

I want to use this data to make a filled contour map imposed on an USA map. 
I notice filled.contour command can be used to make contour plots, but it 
requires the data in a matrix. Would someone please tell me if 
filled.contour is the right thing to look at, if so, how to reshape the data 
into a matrix since my Latitude and Longitude are not evenly distributed?

Thanks,
Maria



More information about the R-help mailing list