Boxcox transformation of explanatory variables
Can someone help me with commands on how to do boxcox transformations on explanatory variables?
r-sig-geo-request at r-project.org wrote:
Send R-sig-Geo mailing list submissions to r-sig-geo at r-project.org To subscribe or unsubscribe via the World Wide Web, visit
https://stat.ethz.ch/mailman/listinfo/r-sig-geo or, via email, send a message with subject or body 'help' to r-sig-geo-request at r-project.org You can reach the person managing the list at r-sig-geo-owner at r-project.org When replying, please edit your Subject line so it is more specific than "Re: Contents of R-sig-Geo digest..." Today's Topics: 1. Re: spatial networks (Mathieu Rajerison) 2. help for show.vgms (Saman Monfared) 3. Re: R-sig-Geo Digest, Vol 118, Issue 25 (Israel Ikoyi) 4. Re: Area of Spatial Domain (Michael Sumner) 5. Re: Problems with readOGR (Roger Bivand) 6. Area calculation error ? (Arnaud Mosnier) 7. Re: Area calculation error ? (Arnaud Mosnier) 8. distance units in "zerodist" function (sp) (Parra, Mauricio (AGPM)) 9. Re: distance units in "zerodist" function (sp) (Edzer Pebesma) 10. Variance of prediction in Kriging with raster package (Maurizio Marchi) 11. Variance of prediction in Kriging (Maurizio Marchi) 12. reclassify() on large files (Koen Hufkens) 13. Re: NetCDF to Brick (Michael Sumner) 14. How to compute an average year on time series ? (Nicolas Bories) ---------------------------------------------------------------------- Message: 1 Date: Wed, 26 Jun 2013 13:13:00 +0200 From: Mathieu Rajerison <mathieu.rajerison at gmail.com> To: Forrest Stevens <forrest at ufl.edu> Cc: "r-sig-geo at r-project.org" <r-sig-geo at r-project.org> Subject: Re: [R-sig-Geo] spatial networks Message-ID: <CAGfc75kKWyEkR7p2F=eEq__3D-zFq1jitavVWNPfHf4wEkFspw at mail.gmail.com> Content-Type: text/plain Hi, Good news. For me, what was missing for the moment with spatial tasks was something that could coerce linear spatial objects to (i)graph objects so as to pull out all the potentiel of igraph package. I can remember some attempts by Barry Rownlingson with a buildTopo function http://rpubs.com/geospacedman/routing What I find constraining in the SpatialLinesNetwork function is that it only accepts singleLine SpatialLines objects, althoug the fact is that the spatial data we'll use will mainly be composed of roads, rivers, etc...that aren't, natively, single lines Maybe we could suggest a function that "explodes" multi-line SpatialLines objects while preserving the attributes (since the attributes can drive some graph analysises) Also, one more thing I think of is snapping: let's suppose I have two points representing buildings and I'd like to compute the shortest path between them. With spatstat, we can get the edge connecting the node (the building) to the network, so we're not far from executing the graph stats. To sum up, I'd sugget: - accepting multi-line SpatialLines objects - building a new network given extra/outer nodes For the moment, to do the basic graph stats, I'd still use GRASS . I would be happy to do all this stuff with R. And I think we're really not that far from that.. 2013/6/25 Forrest Stevens <forrest at ufl.edu> Hi Edzer, this is definitely very cool. This may make some recent work I've been doing on spatial and social network analyses of academic co-authorship easier (early code is here if you're interested: http://refnet.r-forge.r-project.org/ ). Thanks for providing this to the community! Sincerely, Forrest On Sun, Jun 23, 2013 at 10:20 PM, Thomas Adams <tea3rd at gmail.com> wrote: Edzer, That's really pretty cool stuff; I think I can find some applications for it! Cheers! Tom On Sun, Jun 23, 2013 at 5:57 PM, Edzer Pebesma < edzer.pebesma at uni-muenster.de> wrote: I did some simple things trying to combine sp and igraph objects to create spatial networks, and published this at: http://rpubs.com/edzer/spatialnetworks I'd be happy to share the markdown document with you; it seems to me that the rpubs don't allow you to simply download & run all the commands in the html. Anyway, comments & discussion welcome, as usual. -- Edzer Pebesma Institute for Geoinformatics (ifgi), University of M?nster Weseler Stra?e 253, 48151 M?nster, Germany. Phone: +49 251 83 33081, Fax: +49 251 8339763 http://ifgi.uni-muenster.de _______________________________________________ R-sig-Geo mailing list R-sig-Geo at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo [[alternative HTML version deleted]] _______________________________________________ R-sig-Geo mailing list R-sig-Geo at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo -- Forrest R. Stevens Ph.D. Candidate, QSE3 IGERT Fellow Department of Geography Land Use and Environmental Change Institute University of Florida www.clas.ufl.edu/users/forrest _______________________________________________ R-sig-Geo mailing list R-sig-Geo at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo [[alternative HTML version deleted]] ------------------------------ Message: 2 Date: Wed, 26 Jun 2013 16:14:37 +0430 From: Saman Monfared <samanmonfared1 at gmail.com> To: r-sig-geo <r-sig-geo at r-project.org> Subject: [R-sig-Geo] help for show.vgms Message-ID: <CAOytA4ZBvTKkTAqxtB5asakSpxNkfG+_aEnd7HhOCbdE0xButg at mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Dear All, I try to plot some variogram models in a panel by show.vgms in gstat. my program is: show.vgms(min =0, max =200000, n = 50, sill =c(v.ols$psill[2],v.wls$psill[2], v.gls$psill[2],v.rml$sigmasq,v.reml$sigmasq,v.opvme$psill[2],v.opv$psill[2], v.opvab$psill[2],v.opvlin$psill[2]/3),range =c(v.ols$range[2],v.wls$range[2], v.gls$range[2],v.rml$phi,v.reml$phi,v.opvme$range[2],v.opv$range[2] ,v.opvab$range[2],v.opvlin$range[2]),models ="Sph",nugget=c(v.ols$psill[1], v.wls$psill[1],v.gls$psill[1],0,0,v.opvme$psill[1],v.opv$psill[1], v.opvab$psill[1],v.opvlin$psill[1]/3),plot =T,as.groups =F) I have some problem: 1-How can I replace my desired name c("OLS","WLS","GLS","ML","REML",,.....)instead of model names? 2- How can I create a legend with names: c("OLS","WLS","GLS","ML","REML",,.....)? 3- How can I change lines to points and change pch? Best. -- Saman Monfared Msc, Department of Statistics, Shiraz University, Shiraz 71454, Iran Email: Samanmonfared1 at gmail.com Tel: +98 917 5305167 ------------------------------ Message: 3 Date: Wed, 26 Jun 2013 04:44:16 -0700 (PDT) From: Israel Ikoyi <onos2god at yahoo.com> To: "r-sig-geo at r-project.org" <r-sig-geo at r-project.org> Subject: Re: [R-sig-Geo] R-sig-Geo Digest, Vol 118, Issue 25 Message-ID: <1372247056.58287.YahooMailNeo at web160602.mail.bf1.yahoo.com> Content-Type: text/plain How can I do boxcox transformation for explanatory variables and use it in a multiple linear regression? ? Kind regards, ISRAEL O. IKOYI MSc. Thesis Research Student Wageningen University? Department of Soil Quality? P.O. Box 47? NL-6700 AA Wageningen? The?Netherlands ________________________________ From: "r-sig-geo-request at r-project.org" <r-sig-geo-request at r-project.org> To: r-sig-geo at r-project.org Sent: Wednesday, June 26, 2013 12:00 PM Subject: R-sig-Geo Digest, Vol 118, Issue 25 Send R-sig-Geo mailing list submissions to ??? r-sig-geo at r-project.org To subscribe or unsubscribe via the World Wide Web, visit ??? https://stat.ethz.ch/mailman/listinfo/r-sig-geo or, via email, send a message with subject or body 'help' to ??? r-sig-geo-request at r-project.org You can reach the person managing the list at ??? r-sig-geo-owner at r-project.org When replying, please edit your Subject line so it is more specific than "Re: Contents of R-sig-Geo digest..." Today's Topics: ? 1. Re: spatial networks (Forrest Stevens) ? 2. NetCDF to Brick (JacobF) ? 3. Re: Is it possible to merge togheter different ENFA??? results? ? ? ? (Mathieu Basille) ? 4. Problems with readOGR (Renger van Nieuwkoop) ---------------------------------------------------------------------- Message: 1 Date: Tue, 25 Jun 2013 09:17:36 -0400 From: Forrest Stevens <forrest at ufl.edu> To: "r-sig-geo at r-project.org" <r-sig-geo at r-project.org> Subject: Re: [R-sig-Geo] spatial networks Message-ID: ??? <CAEBQMM=PrKEYQKL=ViksG+oBYGd6J4-0KtKe44EWX0Vdt6Vojw at mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Hi Edzer, this is definitely very cool.? This may make some recent work I've been doing on spatial and social network analyses of academic co-authorship easier (early code is here if you're interested:? http://refnet.r-forge.r-project.org/ ).? Thanks for [[elided Yahoo spam]] Sincerely, Forrest On Sun, Jun 23, 2013 at 10:20 PM, Thomas Adams <tea3rd at gmail.com> wrote: Edzer, That's really pretty cool stuff; I think I can find some applications for it! Cheers! Tom On Sun, Jun 23, 2013 at 5:57 PM, Edzer Pebesma < edzer.pebesma at uni-muenster.de> wrote: I did some simple things trying to combine sp and igraph objects to create spatial networks, and published this at: http://rpubs.com/edzer/spatialnetworks I'd be happy to share the markdown document with you; it seems to me that the rpubs don't allow you to simply download & run all the commands in the html. Anyway, comments & discussion welcome, as usual. -- Edzer Pebesma Institute for Geoinformatics (ifgi), University of M?nster Weseler Stra?e 253, 48151 M?nster, Germany. Phone: +49 251 83 33081, Fax: +49 251 8339763 http://ifgi.uni-muenster.de _______________________________________________ R-sig-Geo mailing list R-sig-Geo at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo ? ? ? ? [[alternative HTML version deleted]] _______________________________________________ R-sig-Geo mailing list R-sig-Geo at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo -- Forrest R. Stevens Ph.D. Candidate, QSE3 IGERT Fellow Department of Geography Land Use and Environmental Change Institute University of Florida www.clas.ufl.edu/users/forrest ------------------------------ Message: 2 Date: Tue, 25 Jun 2013 10:53:41 -0700 (PDT) From: JacobF <jsf2fa at mail.missouri.edu> To: r-sig-geo at r-project.org Subject: [R-sig-Geo] NetCDF to Brick Message-ID: <1372182821195-7583910.post at n2.nabble.com> Content-Type: text/plain; charset=us-ascii I'm having an issue with creating a raster brick from a NetCDF. Normally this works fine but for a file I recently downloaded the time and X dimensions are getting swapped so I get a brick with dimensions 72, 7300, 525600, 110 (nrow, ncol, ncell, nlayers), when it should be 72, 110, 7920, 7300? (nrow, ncol, ncell, nlayers). I haven't seen any documentation for setting the x, y and z variables when creating a brick, only when outputting one as a NetCDF. -- View this message in context: http://r-sig-geo.2731867.n2.nabble.com/NetCDF-to-Brick-tp7583910.html Sent from the R-sig-geo mailing list archive at Nabble.com. ------------------------------ Message: 3 Date: Tue, 25 Jun 2013 14:55:26 -0400 From: Mathieu Basille <basille.web at ase-research.org> To: Michela Giusti <michela.giusti at isprambiente.it> Cc: "r-sig-geo at r-project.org" <r-sig-geo at r-project.org> Subject: Re: [R-sig-Geo] Is it possible to merge togheter different ??? ENFA??? results? Message-ID: <51C9E79E.1060704 at ase-research.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Dear Michela, I'm not quite sure to understand what you really intend to do. I can see that you performed individual ENFAs for each of your study site. This is fair, although you might be interested in the OMI for that multi-niche comparison (see ?niche in package ade4, and reference [1]). But now, you want to perform a MADIFA on top of this? It does not make sense to me... Here, I'm really not sure what you want to do. Finally, a single analysis for the 3 sites at once might also make sense, and this is largely feasible with R. It will need a little bit of tweaking though. All you have to do is to combine the results after the extraction of the environmental characteristics and the vector of presence (before the PCA). Hope this helps, Mathieu Basille. [1] Doledec, S.; Chessel, D. & Gimaret Carpentier, C. (2000) Niche separation in community analysis: A new method. Ecology, 81: 2914-2927 doi 10.1890/0012-9658(2000)081[2914:NSICAA]2.0.CO;2 Le 06/25/2013 05:36 AM, Michela Giusti a ?crit : Hello everybody , I have a question regarding ENFA process. I have 3 sites far from one another along the Mediterranean Sea. I performed 3 different ENFA (one for each site; the species is the same for each site). Now I would like to merge togheter the 3 ENFA results to have the final result and to perform the final MADIFA on it. Is it possible to do that? I tryed also to do a single ENFA on the 3 sites from the beginning of my analysis , but I had problems with the extents of the rasters. Thank you very much for your help. Bye, Michela -- ~$ whoami Mathieu Basille, PhD ~$ locate --details University of Florida \\ Fort Lauderdale Research and Education Center (+1) 954-577-6314 http://ase-research.org/basille ~$ fortune ? Le tout est de tout dire, et je manque de mots Et je manque de temps, et je manque d'audace. ? ? -- Paul ?luard ------------------------------ Message: 4 Date: Wed, 26 Jun 2013 09:16:39 +0000 From: Renger van Nieuwkoop <renger at vannieuwkoop.ch> To: "R-sig-Geo at r-project.org" <R-sig-Geo at r-project.org> Subject: [R-sig-Geo] Problems with readOGR Message-ID: ??? <5E17CCD4AACE3A4C8CFF411186AE81903195E59C at ExDAG30-N1.hostallapps.net> Content-Type: text/plain Hi I tried running the following code using the shapefiles for the city of Zurich require("rgdal") # requires sp, will use proj.4 if installed require("maptools") zh = readOGR(".",layer="Zurich") and got following error: OGR data source with driver: ESRI Shapefile Source: ".", layer: "Zurich" with 34 features and 6 fields Feature type: wkbPolygon with 2 dimensions Fehler in CRS(p4s) : lat_0 = 0 or 90 or alpha = 90 ogrInfo gives me this: ogrInfo(".","Zurich") Source: ".", layer: "Zurich" Driver: ESRI Shapefile number of rows 34 Feature type: wkbPolygon with 2 dimensions Extent: (676227 241585) - (689671 254305.7) CRS: +proj=omerc +lat_0=46.95240555555556 +lonc=7.439583333333333 +alpha=90 +k=1 +x_0=-9419820.590700001 +y_0=200000 +ellps=bessel +units=m +no_defs LDID: 87 Number of fields: 6 ? ? ? ? name type length typeName 1? ? GMDEQNR? ? 0? ? ? 7? Integer 2? ? ? ? NR? ? 0? ? ? 9? Integer 3? ? ? NAME? ? 4? ? 45? String 4? ? ? GMDE? ? 0? ? ? 9? Integer 5 FLAECHE_HA? ? 0? ? ? 9? Integer 6? Quartier? ? 0? ? ? 4? Integer I can see that lat_0 is not equal to zero, but don't know how to resolve this issue. Thanks in advance for help Renger _________________________________________ Renger van Nieuwkoop Centre for Energy Policy and Economics, ETH Z?richbergstrasse 18 (ZUE) CH - 8032 Z?rich +41 44 632 02 63 mailto: rengerv at etzh.ch<mailto:rengerv at etzh.ch> blog.modelworks.ch ??? [[alternative HTML version deleted]] ------------------------------ _______________________________________________ R-sig-Geo mailing list R-sig-Geo at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo End of R-sig-Geo Digest, Vol 118, Issue 25 ****************************************** [[alternative HTML version deleted]] ------------------------------ Message: 4 Date: Wed, 26 Jun 2013 21:49:20 +1000 From: Michael Sumner <mdsumner at gmail.com> To: Moshood Agba Bakare <bakare at ualberta.ca> Cc: "r-sig-geo at r-project.org" <r-sig-geo at r-project.org> Subject: Re: [R-sig-Geo] Area of Spatial Domain Message-ID: <CAAcGz9_nXyMbUKhg2AMySE-BeAiD3_+Q064WdRbZXw7nXQdemQ at mail.gmail.com> Content-Type: text/plain; charset=UTF-8 In general, no you cannot say that this would be correct. It depends on where and how extensive the region is, so if you can tell us that I could put together something to show how valid it would be. You should reproject to a local equal area projection and then it's going to be valid, but even then you'd want to do some checks, depending, again on where and for what. Within 100s of kilometres is probably ok, but then it depends on the latitude you are at, *and* which zone you are using (it's easy to get this wrong believe it or not and UTM is one of those *defaults* that can cause problems because it is a default - there's no good technical reason to use it if you can help it. Each zone is only 6 degrees wide, and if you are near a transition it's better to use a local one rather than a standard zone, which again begs the question of why it would be used). This also has relevance downstream if you are using a projection incorrectly so it's worth understanding well. There are plenty of resources on this out there. Cheers, Mike. It's safest to reproject to an appropriate equal area projection, and then On Tue, Jun 25, 2013 at 6:38 AM, Moshood Agba Bakare <bakare at ualberta.ca> wrote: Dear All, Am I right to calculate the spatial region or domain by multiplying the range of easting and northing coordinates? That is, I intend to find the difference between the minimum and maximum values in meters for each of the UTM coordinates (easting and northing) and get the product of the range as area of spatial domain in square meters. Please let me know if I am right or wrong. Thank you. Moshood [[alternative HTML version deleted]] _______________________________________________ R-sig-Geo mailing list R-sig-Geo at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo -- Michael Sumner Hobart, Australia e-mail: mdsumner at gmail.com ------------------------------ Message: 5 Date: Wed, 26 Jun 2013 14:05:32 +0200 From: Roger Bivand <Roger.Bivand at nhh.no> To: Renger van Nieuwkoop <renger at vannieuwkoop.ch> Cc: "R-sig-Geo at r-project.org" <R-sig-Geo at r-project.org> Subject: Re: [R-sig-Geo] Problems with readOGR Message-ID: <alpine.LRH.2.03.1306261354490.24217 at reclus.nhh.no> Content-Type: text/plain; format=flowed; charset="US-ASCII" On Wed, 26 Jun 2013, Renger van Nieuwkoop wrote: Hi I tried running the following code using the shapefiles for the city of Zurich require("rgdal") # requires sp, will use proj.4 if installed require("maptools") zh = readOGR(".",layer="Zurich") and got following error: OGR data source with driver: ESRI Shapefile Source: ".", layer: "Zurich" with 34 features and 6 fields Feature type: wkbPolygon with 2 dimensions Fehler in CRS(p4s) : lat_0 = 0 or 90 or alpha = 90 See: http://osgeo-org.1560.x6.nabble.com/Re-Swiss-CORINE-Bessel-1841-Hotine-Oblique-Mercator-Azimuth-Natural-Origin-td3842640.html Here alpha = 90, http://trac.osgeo.org/proj/wiki/GenParms#Parameterlist +alpha ? Used with Oblique Mercator and possibly a few others The resolution in the thread: ogr2ogr shp_dir/ -s_srs epsg:21781 -t_srs epsg:3035 clcbn85p.shp gets from an alternative encoding to LAEA, you may rather need to impose the CRS (delete the offending *.prj file, and impose after reading - but be sure to impose the right CRS). Read the whole thread on the PROJ.4 list, and go back to Cliff Mugnier's Grids & Datums piece in 2001 too. This is a particularly contentious set of projection arguments, and there are many other Oblique Mercator threads on that list. Hope this helps, Roger ogrInfo gives me this: ogrInfo(".","Zurich") Source: ".", layer: "Zurich" Driver: ESRI Shapefile number of rows 34 Feature type: wkbPolygon with 2 dimensions Extent: (676227 241585) - (689671 254305.7) CRS: +proj=omerc +lat_0=46.95240555555556 +lonc=7.439583333333333 +alpha=90 +k=1 +x_0=-9419820.590700001 +y_0=200000 +ellps=bessel +units=m +no_defs LDID: 87 Number of fields: 6 name type length typeName 1 GMDEQNR 0 7 Integer 2 NR 0 9 Integer 3 NAME 4 45 String 4 GMDE 0 9 Integer 5 FLAECHE_HA 0 9 Integer 6 Quartier 0 4 Integer I can see that lat_0 is not equal to zero, but don't know how to resolve this issue. Thanks in advance for help Renger _________________________________________ Renger van Nieuwkoop Centre for Energy Policy and Economics, ETH Z?richbergstrasse 18 (ZUE) CH - 8032 Z?rich +41 44 632 02 63 mailto: rengerv at etzh.ch<mailto:rengerv at etzh.ch> blog.modelworks.ch [[alternative HTML version deleted]] -- Roger Bivand Department of Economics, NHH Norwegian School of Economics, Helleveien 30, N-5045 Bergen, Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43 e-mail: Roger.Bivand at nhh.no ------------------------------ Message: 6 Date: Wed, 26 Jun 2013 09:49:49 -0400 From: Arnaud Mosnier <a.mosnier at gmail.com> To: r-sig-geo at r-project.org Subject: [R-sig-Geo] Area calculation error ? Message-ID: <CANkFkEf5taFAzHJXn5DtrA52Pq0Xt0tmReA0+WqanDZXt+zCbg at mail.gmail.com> Content-Type: text/plain Hi, Maybe I made an error somewhere, but I can't find where ! There is differences when I calculated the area of a rectangular polygon and the value calculated by the function Polygon. Sorry for the large precision numbers, but I tested if it was due to a rounding error. Hope you can enlighten me. Thanks. Arnaud ########################################## Sr1 = Polygon(cbind(c(526253.713768354034983, 526248.093571954057552, 526458.286270954064094 , 526463.906467354041524, 526253.713768354034983), c(5242206.17401464004070,5242528.15709813963622,5242531.82599973957986, 5242209.84291623998433, 5242206.17401464004070))) # Area indicated in Sr1 = 67699.11 Width <- abs(526253.713768354034983 - 526463.906467354041524) Length <- abs(5242206.17401464004070 - 5242528.15709813963622) Width * Length # Area calculated (rectangular area) = 67678.49 [[alternative HTML version deleted]] ------------------------------ Message: 7 Date: Wed, 26 Jun 2013 10:27:17 -0400 From: Arnaud Mosnier <a.mosnier at gmail.com> To: r-sig-geo at r-project.org Subject: Re: [R-sig-Geo] Area calculation error ? Message-ID: <CANkFkEefCNUaj4Q0wj3Y6mS7QYP+Gu77uuK7O5+hUFst+49Asw at mail.gmail.com> Content-Type: text/plain Sorry ... my mistake ... the rectangle is slightly rotated ... here is the difference. Arnaud 2013/6/26 Arnaud Mosnier <a.mosnier at gmail.com> Hi, Maybe I made an error somewhere, but I can't find where ! There is differences when I calculated the area of a rectangular polygon and the value calculated by the function Polygon. Sorry for the large precision numbers, but I tested if it was due to a rounding error. Hope you can enlighten me. Thanks. Arnaud ########################################## Sr1 = Polygon(cbind(c(526253.713768354034983, 526248.093571954057552, 526458.286270954064094 , 526463.906467354041524, 526253.713768354034983), c(5242206.17401464004070,5242528.15709813963622,5242531.82599973957986, 5242209.84291623998433, 5242206.17401464004070))) # Area indicated in Sr1 = 67699.11 Width <- abs(526253.713768354034983 - 526463.906467354041524) Length <- abs(5242206.17401464004070 - 5242528.15709813963622) Width * Length # Area calculated (rectangular area) = 67678.49 [[alternative HTML version deleted]] ------------------------------ Message: 8 Date: Thu, 27 Jun 2013 05:17:26 +0200 From: "Parra, Mauricio (AGPM)" <Mauricio.Parra at fao.org> To: "R-sig-Geo at r-project.org" <R-sig-Geo at r-project.org> Subject: [R-sig-Geo] distance units in "zerodist" function (sp) Message-ID: <7FAA73D70AEE6B4BA5BE48F8BD97BC9A05F5B59398 at HQEXDB02.hq.un.fao.org> Content-Type: text/plain; charset="us-ascii" An HTML attachment was scrubbed... URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20130627/17887731/attachment-0001.html> ------------------------------ Message: 9 Date: Thu, 27 Jun 2013 07:35:10 +0200 From: Edzer Pebesma <edzer.pebesma at uni-muenster.de> To: "Parra, Mauricio (AGPM)" <Mauricio.Parra at fao.org>, "r-sig-geo at r-project.org" <r-sig-geo at r-project.org> Subject: Re: [R-sig-Geo] distance units in "zerodist" function (sp) Message-ID: <51CBCF0E.3000108 at uni-muenster.de> Content-Type: text/plain; charset=ISO-8859-1 Good point, thanks! zerodist computes Euclidian distances, meaning you should use have projected coordinates to do something useful at the poles. I'll put it on the TODO list to compute great circle distances when data are in long lat, hopefully for the next sp, which might come out pretty soon. Best regards, On 06/27/2013 05:17 AM, Parra, Mauricio (AGPM) wrote: Hi everyone, I would like to know how the distance for "zero" parameter in zerodist/remove.duplicates function (sp package) should be entered when coordinates for SpatialPoints are in lat/long. Function documentation has no mention about you have to use either map units (decimal degrees for lat/long) or in all cases meters. Thanks in advance, Sincerely, Mauricio _______________________________________________ R-sig-Geo mailing list R-sig-Geo at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo -- Edzer Pebesma Institute for Geoinformatics (ifgi), University of M?nster Weseler Stra?e 253, 48151 M?nster, Germany. Phone: +49 251 83 33081, Fax: +49 251 8339763 http://ifgi.uni-muenster.de ------------------------------ Message: 10 Date: Thu, 27 Jun 2013 08:34:51 +0200 From: Maurizio Marchi <mauriziomarchi85 at gmail.com> To: "r-sig-geo at r-project.org" <r-sig-geo at r-project.org> Subject: [R-sig-Geo] Variance of prediction in Kriging with raster package Message-ID: <CANJhsN1VM9dRQZHptHDF6F9W9wn01Lt9=xvq1EVn9ueqXu5qTQ at mail.gmail.com> Content-Type: text/plain Hallo everybody. Using the krige() function of the gstat package for ordinary and universal kriging and the predict() function of the same package for ordinary and universal cokriging I obtain the prediction of the variable and also the variance of prediction. Is possible to do the same with the raster package, maybe with an option of the interpolate() function? Thanks, Maurizio Marchi Forestry Ph.D student -- Maurizio Marchi ID skype: maurizioxyz *Ubuntu 12.04 (Precise Pangolin)* *"Il bello dell'open-source ? che le domande possono essere poste alla fonte"* *utente linux 552.742* [[alternative HTML version deleted]] ------------------------------ Message: 11 Date: Thu, 27 Jun 2013 08:34:57 +0200 From: Maurizio Marchi <mauriziomarchi85 at gmail.com> To: "r-sig-geo at r-project.org" <r-sig-geo at r-project.org> Subject: [R-sig-Geo] Variance of prediction in Kriging Message-ID: <CANJhsN03egawdenX8nL9UP+M=7PcE6mYgm89AmO48mhg5eszbg at mail.gmail.com> Content-Type: text/plain Hallo everybody. Using the krige() function of the gstat package for ordinary and universal kriging and the predict() function of the same package for ordinary and universal cokriging I obtain the prediction of the variable and also the variance of prediction. Is possible to do the same with the raster package, maybe with an option of the interpolate() function? Thanks, Maurizio Marchi Ph.D student -- Maurizio Marchi ID skype: maurizioxyz *Ubuntu 12.04 (Precise Pangolin)* *"Il bello dell'open-source ? che le domande possono essere poste alla fonte"* *utente linux 552.742* [[alternative HTML version deleted]] ------------------------------ Message: 12 Date: Thu, 27 Jun 2013 10:21:45 +0200 From: Koen Hufkens <koen.hufkens at gmail.com> To: r-sig-geo <r-sig-geo at r-project.org> Subject: [R-sig-Geo] reclassify() on large files Message-ID: <CAHDtqqmmA=eacEXxKsqYV0vsH-Vg=RDTV0CsN6ArcE6UBpE2Cg at mail.gmail.com> Content-Type: text/plain Hi all, I'm trying reclassify an image but I keep hitting upon the error: R <- reclassify(zones,rcl.r) Error in setValues(out, .Call("reclass", values(x), rcl, include.lowest, : length(values) is not equal to ncell(x), or to 1 If I plot the 'zones' RasterLayer I also get this error: plot(zones) Warning message: In matrix(x, ncol = cr[1], nrow = cr[2], byrow = TRUE) : data length [25740] is not a sub-multiple or multiple of the number of rows [159] where 'zones' is the output of the aggregate() function. Both are related as it does not occur if I use a smaller image although the procedure is exactly the same. Any clues on why this is, and how to solve it? Thanks in advance, Koen [[alternative HTML version deleted]] ------------------------------ Message: 13 Date: Thu, 27 Jun 2013 18:50:47 +1000 From: Michael Sumner <mdsumner at gmail.com> To: JacobF <jsf2fa at mail.missouri.edu> Cc: r-sig-geo at r-project.org Subject: Re: [R-sig-Geo] NetCDF to Brick Message-ID: <CAAcGz98VKdYpd-M6AGhWpXYNH2Z4GeOONqEUTPC_LctDb_2QBA at mail.gmail.com> Content-Type: text/plain; charset=UTF-8 this is hard to generalize for something like raster (though no doubt the authors will get to it eventually), I would suggest just using ncdf4, RNetCDF, or ncdf packages to open, read and manipulate this more directly in R. It's not difficult and you could report back your pathway to raster objects to inspire others. (I prefer RNetCDF only because I'm more familiar with it, but since raster uses ncdf or preferentially ncdf4 it's probably best to start there). On Wed, Jun 26, 2013 at 3:53 AM, JacobF <jsf2fa at mail.missouri.edu> wrote: I'm having an issue with creating a raster brick from a NetCDF. Normally this works fine but for a file I recently downloaded the time and X dimensions are getting swapped so I get a brick with dimensions 72, 7300, 525600, 110 (nrow, ncol, ncell, nlayers), when it should be 72, 110, 7920, 7300 (nrow, ncol, ncell, nlayers). I haven't seen any documentation for setting the x, y and z variables when creating a brick, only when outputting one as a NetCDF. -- View this message in context: http://r-sig-geo.2731867.n2.nabble.com/NetCDF-to-Brick-tp7583910.html Sent from the R-sig-geo mailing list archive at Nabble.com. _______________________________________________ R-sig-Geo mailing list R-sig-Geo at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo -- Michael Sumner Hobart, Australia e-mail: mdsumner at gmail.com ------------------------------ Message: 14 Date: Thu, 27 Jun 2013 10:56:17 +0200 From: Nicolas Bories <nicolas.bories at orange.fr> To: r-sig-geo at r-project.org Subject: [R-sig-Geo] How to compute an average year on time series ? Message-ID: <51CBFE31.2070004 at orange.fr> Content-Type: text/plain Dear all, I'm working on EVI-MODIS time series with the R package spacetime. I have 10 years of data. I want to compute an average year for each pixel. How can I do this ? The goal is to compare for each pixel and for specific years the EVI-MODIS variations and average year variations. I saw the method aggregate(x, by, FUN = mean, ..., simplify = TRUE) but I didn't manage to get an average year. Thanks in advance for any suggestions ! Nicolas. [[alternative HTML version deleted]] ------------------------------ _______________________________________________ R-sig-Geo mailing list R-sig-Geo at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo End of R-sig-Geo Digest, Vol 118, Issue 26 ******************************************