Re: [R-sig-Geo] CAR proper

2011-08-26 Thread Roger Bivand
On Thu, 25 Aug 2011, Timothy Mutsvari wrote: Dear users, I'm getting the following error when trying to compile my BUGS code: error for node v[1] of type SpatialCARNormal.Node first argument vector has wrong length.' Is this an openBUGS question, an R question, or both? Could you provide

[R-sig-Geo] Ideas appreciated for spatial structure analysis

2011-08-26 Thread Laura S
Dear all: I am working on analyzing the spatial structure of tree and environment data as a preliminary step before doing further analysis. I was wondering which R functions you recommend to assess the degree of spatial structure for tree and habitat data given the following: 1. The locations

Re: [R-sig-Geo] spacetime: remove NAs from STSDF object

2011-08-26 Thread Christian Kamenik
Dear Edzer, my.STSDF - as(my.STFDF, STSDF) does exactly what it should. I have a STSDF object with several columns of data that have NAs for one variable but not for other variables. I wanted to keep only those observations in space and time that had data (no NAs) for all variables (see

[R-sig-Geo] stplot: choosing constant time interval between plots

2011-08-26 Thread Mathieu Rajerison
Hi, I have a question about stplot. Let's say I'd like to plot via multi-panel a series of plots separated by a given time interval. How can I accomplish that? Also, let's say this time interval is specified between thow given time instances, for example: every week between 14/07/11 and

Re: [R-sig-Geo] using 'for loop' for assigning saved function values of function envelope in spatstsat

2011-08-26 Thread Quets Jan
Thank you, this is what I need! Van: adrian.badde...@csiro.au [adrian.badde...@csiro.au] Verzonden: vrijdag 26 augustus 2011 10:42 Aan: r-sig-geo@r-project.org CC: Quets Jan; adrian.badde...@csiro.au; r.tur...@auckland.ac.nz Onderwerp: [R-sig-Geo] using

[R-sig-Geo] ASCII grid file - extracting data after import with readGDAL()

2011-08-26 Thread Michał Kwieciński
Hi, I am having difficulty in reading data for further use that is in ASCII grid format (it's the UN population data from http://sedac.ciesin.columbia.edu/gpw). I used readGDAL function which leaves me with SpatialGridDataFrame class object, but apart from creating simple image with map =

[R-sig-Geo] Antw: ASCII grid file - extracting data after import with readGDAL()

2011-08-26 Thread Alexander Arpaci
Hello, I use the raster package for asci files it works great and has a very hands on access to get statistics or do any kind of raster operations hth a MSc. Alexander Arpaci Assistant researcher Department of Forest - and Soil Sciences Institute of Silviculture Tel. +43-1-47654-4081 e-mail:

Re: [R-sig-Geo] ASCII grid file - extracting data after import with readGDAL()

2011-08-26 Thread Forrest Stevens
As you said, readGDAL will give you a SpatialGridDataFrame object, which behaves much like a normal data.framet. Your best bet is to run it through names to see what data are available to work with: names(map) Like a regular data.frame this will give you the bands or data read in from your

[R-sig-Geo] CAR model

2011-08-26 Thread Timothy Mutsvari
Dear Users, I am fitting a spatial model a multilevel data (mouth-tooth-surface) of very small prevalence. Therefore in my case every person will act as a map. I am looking at a binary outcome of a tooth surface which is nested in the tooth and nested in the mouth. So I have a

Re: [R-sig-Geo] ASCII grid file - extracting data after import with readGDAL()

2011-08-26 Thread Matthew Landis
If you want to see more info of the dataset, you can also view it with str(map@data) or head(map@data) Matt On 8/26/2011 9:57 AM, Forrest Stevens wrote: As you said, readGDAL will give you a SpatialGridDataFrame object, which behaves much like a normal data.framet. Your best bet is to run

Re: [R-sig-Geo] ASCII grid file - extracting data after import with readGDAL()

2011-08-26 Thread Michał Kwieciński
Learning about existence of band1 was what I actually needed. Apart from one bigger spatial econometrics project, I haven't done much work with R yet, so I still lack some knowledge on basic operations - I will try to remember about the names() function next time. I thought the problem would lie

Re: [R-sig-Geo] Choropleth in R

2011-08-26 Thread Daniel Arribas-Bel
Hi Reza, I wrote a simple function that creates choropleths in R. You can check out the code on my github repos and some documentation on this post. Github repos: https://github.com/darribas/darribas-R-tools/blob/master/choropleth.r Blog post w/ docs:

Re: [R-sig-Geo] ASCII grid file - extracting data after import with readGDAL()

2011-08-26 Thread Matthew Landis
No worries. good luck! On 8/26/2011 10:45 AM, Michał Kwieciński wrote: Learning about existence of band1 was what I actually needed. Apart from one bigger spatial econometrics project, I haven't done much work with R yet, so I still lack some knowledge on basic operations - I will try to

Re: [R-sig-Geo] Setting FID values when saving GML files with writeOGR

2011-08-26 Thread Roger Bivand
On Thu, 25 Aug 2011, Karl Ove Hufthammer wrote: Dear list members, Is it possible to define which FID values should be used when saving a SpatialPointsDataFrame to a GML files using writeOGR (rgdal package)? The FID values are stored as ogr:layername fid=F0 (and F1, F2, …). If I insert a

Re: [R-sig-Geo] stplot: choosing constant time interval between plots

2011-08-26 Thread Edzer Pebesma
Mathieu, as stplot for STIDF's is still pretty bare, or simple, you might as well work directly with xyplot from lattice. Having your data, it turns out you only have a limited number of dates, the following seems to work: library(lattice) xyplot(y_sref~x_sref|time, as.data.frame(ciotat.t),

Re: [R-sig-Geo] Setting FID values when saving GML files with writeOGR

2011-08-26 Thread Roger Bivand
On Fri, 26 Aug 2011, Roger Bivand wrote: On Thu, 25 Aug 2011, Karl Ove Hufthammer wrote: Dear list members, Is it possible to define which FID values should be used when saving a SpatialPointsDataFrame to a GML files using writeOGR (rgdal package)? The FID values are stored as

[R-sig-Geo] how to initialize corStruct with a distance matrix

2011-08-26 Thread Jean-Baptiste Ferdy
Dear R-users, I'd like to use a corStruct matrix in fitting a binomial model, but I need to define it using a pre-calculated distance matrix (instead of feeding it with spatial coordinates). Do you have any idea on how to do this in a simple manner? So far the only way I could imagine was to