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?
adding a bravais pearson test to spplot
6 messages · fathalli bilel, Jeff Newmiller, John Kane +1 more
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:
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.
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:
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.
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:
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. On April 15, 2015 3:15:46 AM PDT, 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.
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
-----Original Message----- From: bilelfathalli at yahoo.fr Sent: Wed, 15 Apr 2015 10:15:46 +0000 (UTC) To: r-help at r-project.org Subject: [R] adding a bravais pearson test to spplot 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.
____________________________________________________________ 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.
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.