[R-sig-Geo] How to quickly add many raster layers to a thick RasterStack?

2011-11-01 Thread Ariel Ortiz-Bobea
Hello everyone, I have about 90,000 individual grid files in GRIB format I'm importing and converting to raster format in R. Some of the calculations I need to do (clipping with polygons... thanks Robert J. Hijmans for valuable advice on this!) are best performed on many raster layers at once, e.

Re: [R-sig-Geo] heteroskedasticity corrections for lagsarlm() in spdep

2011-11-01 Thread Christian A.Oberst
I tested the procedure from Marco and it worked fine under the recent spdep update (05-40). But are there any heteroskedastic corrections for the other spatial models (Spatial lag, SAC or Spatial Durbin) estimated with ML-estimations (lagsarlm, errorsarlm, sacsarlm)? I know that there is the s

[R-sig-Geo] US Census 2000 and 2010

2011-11-01 Thread Chris Fowler
Dear all, I am beginning a project that will compare some block group level data from the 2000 and 2010 Censuses in the U.S. Before I begin I wanted to survey the list and see if anyone had any experience with two of the stumbling blocks I foresee. 1)Is there some good R code for accessing and par

Re: [R-sig-Geo] Problem with raster calculation

2011-11-01 Thread Roman Luštrik
What version of raster are you using? I don't get your behavior. I've tried this on R 2.13.2 and R 2.14 (two different versions of raster). > a <- c(1,1,1,0,0,0,2,2,2) > a <- matrix(a,3,3,byrow=T) > a <- raster(a) > a [] [1] 1 1 1 0 0 0 2 2 2 > b <- 10 - a > b[] [1] 9 9 9 10 10 10 8 8 8 ---

[R-sig-Geo] map resolution

2011-11-01 Thread Chi Kit Lau
Dear list, sorry for the beginner's question. How do I work out the maximum achievable resolution when rasterizing a vector map on a scale 1:1? In other words what is the resolution of a map with a scale 1:1? thank you, Chi Kit ___ R-sig-Geo m

[R-sig-Geo] Problem with raster calculation

2011-11-01 Thread Aidin Niamir
Dear all I am experiencing a strange problem when calculating in the raster package. Let me explain it with a simple example; > a <- c(1,1,1,0,0,0,2,2,2) > a <- matrix(a,3,3,byrow=T) > a <- raster(a) > a [] [1] 1 1 1 0 0 0 2 2 2 > b <- 10 - a > b [] [1]  -9  -9  -9 -10 -10 -10  -8  -8  -8 As you

[R-sig-Geo] problem with raster calculation

2011-11-01 Thread Aidin Niamir
Dear all I am experiencing a strange problem when calculating in the raster package. Let me explain it with a simple expample; > a <- c(1,1,1,0,0,0,2,2,2) > a <- matrix(a,3,3,byrow=T) > a <- raster(a) > a [] [1] 1 1 1 0 0 0 2 2 2 > b <- 10 - a > b [] [1] -9 -9 -9 -10 -10 -10 -8 -8 -8 As yo

Re: [R-sig-Geo] R equivalent of join between two data frames

2011-11-01 Thread Juan Tomas Sayago
Dear Erin I use this one that I found on raymond florax's website for spatial econometrics. It works great with points as well as with polygons. PS: I will attach the R file if you need I can send you the files he used to you on another email. Hope it helps you Juan Tomás # import your shapefile us

Re: [R-sig-Geo] Impoting multiple asci grids into R? Working now!

2011-11-01 Thread Swen Meyer
Hi Robert, after my machine crashed I rebooted it. And used to import the ascii files in the way that you proposed again and now it is working fine! So I think the very long calculation time must have been caused by my OS. If I do the import of the ascii files like this: / library(raster) model

Re: [R-sig-Geo] R equivalent of join between two data frames

2011-11-01 Thread Agustin Lobo
I have had problems using merge() for a similar purpose (see [1]) and I use this function to join a data frame to an existing Spatial Polygons or Points Data frame. Extending this to 2 SPDF should be easy: I wish these type of commands existed in official sp "mijoin" <- function(SPDF1,tabla,by.x,b

Re: [R-sig-Geo] R equivalent of join between two data frames

2011-11-01 Thread Hodgess, Erin
Ok. I just tried with incomparable=NA and removed too many this time! thanks!!! Erin M. Hodgess, PhD Associate Professor Department of Computer and Mathematical Sciences University of Houston - Downtown mailto: hodge...@uhd.edu -Original Message- From: Francis Markham [mailto:fmark.

Re: [R-sig-Geo] R equivalent of join between two data frames

2011-11-01 Thread Francis Markham
Erin, I believe you can. See the help for merge, in particular the all.x and all.y parameters. Cheers, F. Markham On 1 November 2011 18:03, Hodgess, Erin wrote: > Hi! > > I'd like to remove the non-matching rows, if possible.  I don't think you can > do that with merge. > > Thanks, > Erin > >

Re: [R-sig-Geo] R equivalent of join between two data frames

2011-11-01 Thread Hodgess, Erin
Hi! I'd like to remove the non-matching rows, if possible. I don't think you can do that with merge. Thanks, Erin Erin M. Hodgess, PhD Associate Professor Department of Computer and Mathematical Sciences University of Houston - Downtown mailto: hodge...@uhd.edu -Original Message- F

Re: [R-sig-Geo] R equivalent of join between two data frames

2011-11-01 Thread Dan Putler
Hi Erin, Is the "merge" function appropriate? If you are joining a non-spatial data frame to a spatial data frame object (e.g., a SpatialPointsDataFrame) it should work. Dan On 10/31/2011 11:33 PM, Hodgess, Erin wrote: Dear R Sig Geo People: Is there an equivalent of "join" from ArcGIS 10