[R] adding a bravais pearson test to spplot
MacQueen, Don
macqueen1 at llnl.gov
Wed Apr 15 20:58:24 CEST 2015
I also suggest you take this question to R-Sig-geo.
Since spplot() is built on the lattice package, adding new elements to an
existing plot is, in my experience, difficult to learn how to do. If you
can possibly start with plot() instead of spplot() you will, I think, find
it much easier to add contour lines.
It will all depend on what kind of objects your data are.
Here is an example that might help, or at least give you a few more things
to look at.
> library(sp)
> library(maptools)
Checking rgeos availability: TRUE
> data(meuse.grid)
> coordinates(meuse.grid) <- c('x','y')
> meuse.grid <- as(meuse.grid, 'SpatialPixelsDataFrame')
> im <- as.image.SpatialGridDataFrame(meuse.grid['dist'])
> cl <- ContourLines2SLDF(contourLines(im))
> spplot(cl)
--
Don MacQueen
Lawrence Livermore National Laboratory
7000 East Ave., L-627
Livermore, CA 94550
925-423-1062
On 4/15/15, 3:15 AM, "fathalli bilel" <bilelfathalli at yahoo.fr> wrote:
>Dear all,
>My name is Bilel and I'am a PhD student from Tunisia working on climate
>modelling. My issue today is how to add a Bravais Pearson test as a
>contour plot to an existing spplot map. Precisely, I have plotted a
>SpatialPixelsDataFrame of Pearson correlation coefficients between
>simulated and observed precipitation over the Mediterranean basin using
>spplot and I need to now add a contour line of the statically significant
>correlation coefficient at 95% CI.I have been vainly trying for several
>days to solve this issue, so I really need your help please
>Best regards Bilel
> [[alternative HTML version deleted]]
>
>______________________________________________
>R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide
>http://www.R-project.org/posting-guide.html
>and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list