Skip to content

adding a bravais pearson test to spplot

6 messages · fathalli bilel, Jeff Newmiller, John Kane +1 more

#
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?
#
Well, creating an example from scratch to show you how it is done can be a lot of work, and depending on your specific data such code can end up being wasted work. For this reason the polite thing to do is to provide a minimal reproducible example that list readers can use to start from. [1]

Also, you should read the Posting Guide, which warns you that the R mailing lists are plain text only, so if you post HTML as you did then at best we don't see what you see and at worst it is corrupted. The Guide also mentions that there are different lists with different topics, and the topic of your question is probably best addressed on the R-sig-geo mailing list. It looks nontrivial to me, but there might be a canned solution out there.
---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
--------------------------------------------------------------------------- 
Sent from my phone. Please excuse my brevity.
On April 15, 2015 3:15:46 AM PDT, fathalli bilel <bilelfathalli at yahoo.fr> wrote:
#
Hi,First : thanks for your answerThis is my first post on the R-help forum and I'm not familiar with the way how to should post.?I am not searching for "an example from scratch" as you said, I am able to build my own codes so I'm only looking for tips ?: packages, functions that can help my issue?(help that does not mean a "code" ready for use")I'm very polite and I'am shocked by the way your give your answer
Bilel ?


     Le Mercredi 15 avril 2015 15h40, Jeff Newmiller <jdnewmil at dcn.davis.CA.us> a ?crit :
   

 Well, creating an example from scratch to show you how it is done can be a lot of work, and depending on your specific data such code can end up being wasted work. For this reason the polite thing to do is to provide a minimal reproducible example that list readers can use to start from. [1]

Also, you should read the Posting Guide, which warns you that the R mailing lists are plain text only, so if you post HTML as you did then at best we don't see what you see and at worst it is corrupted. The Guide also mentions that there are different lists with different topics, and the topic of your question is probably best addressed on the R-sig-geo mailing list. It looks nontrivial to me, but there might be a canned solution out there.
---------------------------------------------------------------------------
Jeff Newmiller? ? ? ? ? ? ? ? ? ? ? ? The? ? .....? ? ? .....? Go Live...
DCN:<jdnewmil at dcn.davis.ca.us>? ? ? ? Basics: ##.#.? ? ? ##.#.? Live Go...
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Live:? OO#.. Dead: OO#..? Playing
Research Engineer (Solar/Batteries? ? ? ? ? ? O.O#.? ? ? #.O#.? with
/Software/Embedded Controllers)? ? ? ? ? ? ? .OO#.? ? ? .OO#.? rocks...1k
---------------------------------------------------------------------------
Sent from my phone. Please excuse my brevity.


rote:

  
  
#
I think you did not read my answer very carefully... there is a better mailing list for your question. The rest of my comments were intended to educate you, not chastise you. Mailing lists require careful communication, and you do need to improve on your end or you will have "bad luck" getting help in the lists because few people will guess right about what you really need.

I did fail to put in the reference [1] which is very helpful; I am sorry for that omission.

[1] http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example
---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
--------------------------------------------------------------------------- 
Sent from my phone. Please excuse my brevity.
On April 15, 2015 8:04:20 AM PDT, fathalli bilel <bilelfathalli at yahoo.fr> wrote:
#
I think we need basic code and sample data to see what you are doing. 
Have a look at http://adv-r.had.co.nz/Reproducibility.html and/or http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example  for some hints. For this last link it is a good idea to follow the " reproducible example  " link for more concrete suggestions.

As Jeff has pointed out, this is not likely to be the best place to post.  A more specialized group as he suggested is more likely to be able to help.

John Kane
Kingston ON Canada
____________________________________________________________
FREE 3D EARTH SCREENSAVER - Watch the Earth right on your desktop!
#
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.
Checking rgeos availability: TRUE