[R-sig-Geo] Simulating a Gibbs Marked point process

2013-04-09 Thread Ferra Xu
Hi everybody  I want to simulate a pattern of points based on maximization of Gibbs marked point process density function by MCMC methods using R. I already know that rmh function in spatstat will do that, but I couldn't find any good example code for that... I don't know how should I determine

Re: [R-sig-Geo] Help with ENFA in R

2013-04-09 Thread Mathieu Basille
Le 04/09/2013 03:51 PM, JonathanAronson a écrit : Hi Mathieu Thank you so much for your quick response. I really appreciate the effort and thank you for your answers. I am now using the AdehabitatHS package but still have some questions. 1) I am not sure what (renfa$expvar), (renfa$pvalue) and

Re: [R-sig-Geo] Memory problems with dnearneigh in spdep

2013-04-09 Thread Empty Empty
Thanks so much, Roger, for your suggestions. I should have realized it was taking kilometers rather than meters! My summary(r) is: Object of class SpatialPointsDataFrame Coordinates:     min  max coords.x1 -17.52090 51.40407 coords.x2 -34.82918 37.53746 Is projected: TRUE proj4str

Re: [R-sig-Geo] Help with ENFA in R

2013-04-09 Thread JonathanAronson
Hi Mathieu Thank you so much for your quick response. I really appreciate the effort and thank you for your answers. I am now using the AdehabitatHS package but still have some questions. 1) I am not sure what (renfa$expvar), (renfa$pvalue) and (renfa$obs) are actually telling me in the output.

Re: [R-sig-Geo] [raster] conserving dimensions when regridding a 4D Brick or Stack

2013-04-09 Thread Tom Roche
https://stat.ethz.ch/pipermail/r-sig-geo/2013-April/017947.html >> Can one >> + create a 4D RasterBrick or RasterStack >> + instruct projectRaster >> so as to get 4D regridded output? Or must one >> - create 3D RasterLayer's (i.e., one per LAY) from the 4D Brick >> - regrid each 3D Layer >> - r

Re: [R-sig-Geo] rgdal in MAc OSX with R 3.0

2013-04-09 Thread Roger Bivand
See: https://stat.ethz.ch/pipermail/r-sig-geo/2013-April/017934.html for the first posting to ask about rgdal, rgeos, etc. on OSX for R 3.0.0. The rgeos package is now available for this platform (the R offering for OSX has changed a good deal for R 3.0.*), but rgdal is as yet not available.

[R-sig-Geo] rgdal in MAc OSX with R 3.0

2013-04-09 Thread Agustin Lobo
HI, After a long time of not having problems with installing rgdal on Mac OSX using setRepositories(ind=1:2) install.packages("rgdal") (and even perhaps using the gui in RStudio?) I get now package ‘rgdal’ is not available (for R version 3.0.0) Does anybody know if the package will be built fo

Re: [R-sig-Geo] Help with ENFA in R

2013-04-09 Thread Mathieu Basille
Dear Jonathan, Here are a few comments: 1) I strongly suggest that you update to 'adehabitatHS', which has superseded the good-old 'adehabitat'. See [1]. It will solve your error with 'niche.test'. 2) For the tolerance, 'niche.test' will give you both the marginality and the tolerance. 3)

Re: [R-sig-Geo] Plotting .shp and over()

2013-04-09 Thread Barry Rowlingson
On Tue, Apr 9, 2013 at 4:41 PM, Steven Ranney wrote: > When I try to spTransform() the proj4string in barabay, > > spTransform(barabay, CRS("+proj=latlong +datum=WGS84 +ellps=WGS84 > +towgs84=0,0,0")) > > R prints out the object of barabay, including all of the lat/long values > associated with t

[R-sig-Geo] problem density function {raster}

2013-04-09 Thread Carsten Neumann
Hi, there seems to be a problem with the density function when using it with an rasterStack object. d<-density(a1,channel,plot=F) "Error in nlayers == 1 : comparison (1) is possible only for atomic and list types" ?density results in: "Error in httpd("/library/NULL/help/density", NULL, NULL, c(

Re: [R-sig-Geo] Plotting .shp and over()

2013-04-09 Thread Steven Ranney
HA! Got it figured out. It turns out that my shapefile was Longitude *then* Latitude while my coordinates were in Latitude *then *Longitude. I changed them around, copied the proj4string information from summary(*myshapefile*) to the proj4string information into my coordinate information, and wa

Re: [R-sig-Geo] Plotting .shp and over()

2013-04-09 Thread Steven Ranney
Hmm. I reread in my shapeFile using readOGR() and when I summary(), I get this: > summary(barabay) Object of class SpatialPolygonsDataFrame Coordinates: min max x -90.15208 -89.73317 y 29.18969 29.49023 Is projected: FALSE proj4string : [+proj=longlat +datum=WGS84 +no_defs +ellps=

Re: [R-sig-Geo] Combining shp-Files and csv-Data

2013-04-09 Thread kamallauber
First of all thank you for the quick response. I did read the shapefiles with readOGR and i understand how you would do that with rgeos, but i have a single shapefile which consists of all these little "cubes" and i do not understand in which way i can extract some of these cubes from a single sha

Re: [R-sig-Geo] Combining shp-Files and csv-Data

2013-04-09 Thread Roman Luštrik
I would approach this by reading the data in using readOGR from rgdal package. Once you get your projections in order, I would use one of the functions in rgeos to find which "cubes" (let's call them squares for the lack of a better term :) ) lie on the country border. You can merge() your data fro

Re: [R-sig-Geo] Plotting .shp and over()

2013-04-09 Thread Samuel Turgeon
Hi Steven, You should check the projections of your datasets (summary()). When I do the same kind of analyses, I use: readOGR(), to read the shp proj4string(), to assign a projection overlay(), to make spatial overlay analysis spplot(), to plot more than one spatial layer hope this help Sam

[R-sig-Geo] Combining shp-Files and csv-Data

2013-04-09 Thread kamallauber
Hey people, first of all:I am Using R 2.15.3. I have 2 shapefiles (.shp+.dfb+...) and a csv-table. Now, one shape(1) is the border of germany and the other is a grid-like shapefile (2) (not a grid but many little cubes (1x1km). Now I want to have a grid-like shapefile but only in the boundaries

[R-sig-Geo] Plotting .shp and over()

2013-04-09 Thread Steven Ranney
All - My apologies for what is likely a neophyte questions but I'm new to spatial plotting in R and to .shp files in general. I don't know all the terminology which makes reading the help files that much more difficult. I've been asked to do a "point.in.polygon" analysis of some dolphin resighti

[R-sig-Geo] Help with ENFA in R

2013-04-09 Thread JonathanAronson
Hello there I am really hoping someone out there can help me. I have read the various forums but havent found information that can help me. I am running an ENFA in R for 12 species using 15 environmental variables. Below is my code and some questions: library(ade4) library(adehabitat) test<- re

Re: [R-sig-Geo] Variogram Paradox

2013-04-09 Thread Edzer Pebesma
On 04/08/2013 11:11 PM, Edzer Pebesma wrote: > > > On 04/08/2013 08:12 PM, Saman Monfared wrote: >> Dear All, >> We know that the estimation of covariance parameters is an important >> problem for spatial processes because the variogram shows the spatial >> variation. In many cases to select th

Re: [R-sig-Geo] vertical profile of raster DEM along road (package raster)

2013-04-09 Thread Matteo Mattiuzzi
No not yet, you see the "building" status here: https://r-forge.r-project.org/R/?group_id=294 It will be ready when status has become "current". Hard to say when it will be ready but normally it is very fast, occasionally very slow... (You could also build it from from source, but I think you shou