Statistical computing language and software environment.

learn more… | top users | synonyms

5
votes
0answers
592 views

How to get rpy2 for QGIS on OSX?

I am a new QGIS user, have installed QGIS on a Mac running Snow Leopard OSX 10.6.8 following all the instructions. QGIS seems to work well for everything other than when I boot up I get the message ...
4
votes
0answers
338 views

Using stat_density2d with coord_map in ggplot2

In my example I am plotting a shapefile for all England & Wales, however I'm interested in the greater London area. If I allow ggplot to simply default and display the entire shapefile then the ...
4
votes
0answers
157 views

How to build Poisson autoregression model

I have a SpatialPolygonsDataFrame object in R with about 3000 polygons and associated data. I have columns of expected and observed cases. For the moment, I don't have any covariates. I'd like to ...
4
votes
0answers
167 views

Cut polygon and retain data

I have these two polygons: library(sp); library(rgeos); library(maptools) coords1 <- matrix(c(-1.841960, -1.823464, -1.838623, -1.841960, 55.663696, 55.659178, 55.650841, ...
4
votes
0answers
335 views

Rgeos drops associated values when intersecting polygons

I am trying to intersect two SpatialPolygonsDataFrames and get a SpatialPolygonsDataFrame as the result. Unfortunately, using the gIntersection function from rgeos (which works impressively quickly ...
3
votes
0answers
26 views

Spatial interpolation with breaklines in R

I have a dataset consisting of irregularly-spaced points (x,y,value) that represent an area of ocean that contains some land. I need to interpolate these to a regular grid, ensuring that the ...
3
votes
0answers
117 views

R Raster package loop over pixels

I want to perform a trend analysis for each pixel over it's time dimension. Therefore I wrote a loop over each pixel doing the calculation but this is extremely slow. I am sure there must be a faster ...
3
votes
0answers
104 views

Performing cluster analysis in R with Point Datasets

I am a R-Beginner, but I want to use it for some spatial statistics. I want to check the relation between the occurrence of ill persons and the existence of water in a area of interest. To give you a ...
3
votes
0answers
311 views

Fortifying re-projected shapefile for ggplot2 in R

I have a shapefile of US county boundaries which I got from the NHGIS. I can load the file using the rgdal package and see information about it: library(rgdal) shp_1860 <- readOGR("shp", ...
3
votes
0answers
225 views

R with ggplot2/ggmap - How to load a png image as a map

I am trying to find a workaround for ggmap's missing support of world maps (i.e. you can't create any maps that show latitudes > 80°, due to idiosyncrasies in the mapproj package). To a limited extend ...
3
votes
0answers
98 views

Can extracting raster values work in polygons' CRS without raster resampling?

I am trying to extract raster values using polygon layer with different CRS. Raster is in WGS84 (EPSG:4326) and the polygons in UTM (EPSG:23031). 1. If I want to work in the projection of the ...
3
votes
0answers
151 views

Is co kriging appropriate for interpolation of three spatial co variates?

I want to estimate an interpolation model(s) for daily minimum temperature, daily maximum temperature and daily rainfall. I have samples of approximately the same size for all three variables at ...
3
votes
0answers
241 views

Novel ways of filling in missing values in a raster

I am looking for robust ways to fill in missing values in some rasters. They all have a single layer. Missing values consist of single pixels to medium sized patches. Rasters are around 1000 x 1000 ...
3
votes
0answers
552 views

How to Export a Shapefile as KML Using R

All, I have exported an ESRI shapefile (polygon) to KML using R, but the resulting layer shows only the outer extent of the polygon. How can I fill in the area with a color? Any help is greatly ...
3
votes
0answers
240 views

How do I access layer attributes from within QGIS' manageR plugin?

This is probably a fairly basic question, but searches for manageR come up with a lot of noise, and there's no manageR tag. What I'd like to do is load the attributes from a particular field of a ...
2
votes
0answers
66 views

Doubts with Ripley's K function Interpretation

I'm a self-taught person, I'm studying the K Ripley's function and I would need some person who give me some advices. First, I have written a little script of R in QGIS processor: ##Point pattern ...
2
votes
0answers
32 views

R: Can raster predict function pass to predict.rfsrc (a prediction function in a parallel verion of RandomForest)?

It seems that raster predict function can pass to predict.randomForest by setting the "type='response'". I am using a parallel version of randomForest package called the "randomForestSRC" and I am ...
2
votes
0answers
62 views

Three-dimensional interpolation of temperature profiles using gstat in R?

I'm working on a problem in which I'd like to interpolate a set of oceanographic temperature profiles over a three-dimensional matrix of unsampled x, y, & z locations. The data to interpolate is ...
2
votes
0answers
67 views

Ecoregions shapefiles: subsetting, extracting and summarizing data from raster

I am attempting to subset and project an ecoregions shapefile from : EPA ECOREGIONS my data set is found here: SHAPEFILES and RASTER When I run this code, two major problems occur: 1) I cannot get the ...
2
votes
0answers
22 views

In R, set NA cells in one raster where another raster has values

I have two rasters in R. I want to set values to NA in the first raster where the second raster has values. I think this should be simple, using the raster package, with two RasterLayer objects ...
2
votes
0answers
69 views

R - how to create a pre-determined number of identical square polygons to use for a choropleth map?

I am trying to plot crime data density (again!) over a city map, say of NY. As a well known problem there are plenty of examples on this ...
2
votes
0answers
76 views

Decision tree classification of satellite image in R

I want to classify satellite image in R using RWeka classifier, J48. I have a CSV file with the classes required, and raster data loaded in R. I am able to make the tree, however, I am not able to use ...
2
votes
0answers
70 views

python equivalent of spatstat's spatial point process functions

Is there a free python package (i.e. PySAL?) that implements the standard summary statistics for spatial point processes, e.g. the F, G, J, and K functions? I'm happy to use R (i.e. spatstat) if ...
2
votes
0answers
112 views

Joining nearest neighbor small polygons using R

The figure shows a plot of numerous polygons (zoom in) made from a raster file by require(sp) require(raster) pol100 <- rasterToPolygons(r, fun=function(x){x==1}, dissolve=FALSE) There polygon ...
2
votes
0answers
207 views

Mapping Geocoded addresses onto Census shapefiles in R

I have a list of addresses that I have geocoded to get the corresponding longitude and latitude. > AddressDetail <- geocode(match_address) > coordinates(AddressDetail) <- c("lon", "lat") ...
2
votes
0answers
166 views

R, GeoJSON and Leaflet

I recently learned about leafletjs.com from an R-Bloggers.com post. One such tutorial that I would like to achieve is to create interactive choropleth maps with leaflet. I have been using the rjson ...
2
votes
0answers
136 views

Moving point on OpenStreetMap route

Basically I generate random numbers in R language which are indeed times between bus arrivals. I need to simulate a moving point(a bus) in OpenStreetMap by using this generated numbers. I have read ...
2
votes
0answers
235 views

How to load big ASCII rasters in Revolution R?

Is there anyone in this site using Revolution R with big spatial data ? I am trying to load raster files (ascii format) into revolution r using the xdf format, with no luck. Did anyone tried this ...
1
vote
0answers
60 views

What's the difference in these two shp files?

I'm trying to plot points on these maps in R, with points from "Coordinates" in the same folder. The WL.shp plots fine with the data, but the NG.shp (which should only be larger and of the same area ...
1
vote
0answers
14 views

R{raster} getValues(): error accessing values of large raster

I am getting the following, while extracting all values with: rs<-getValues(rster) Error in getRasterData(con, offset = offs, region.dim = reg, band = object at data@band): long vectors not ...
1
vote
0answers
19 views

Finding the best way to prepare raster image for a function in R

I'd like to ask what is the best way to prepare big raster images in R to run a function on whole images. I have 30 tiff images with the size of ncol=12648, nrow=4144. I read them in R separately. ...
1
vote
0answers
31 views

Error with “lowess” function in R

I have a problem with lowess function to smooth NDVI as a time in R. Here is the scripts I run: #Create a time vector to act as x time<-sort(sample(97:297, nlayers(ndvi2000crop1))) ...
1
vote
0answers
43 views

Is there any issue using R scripts with sextante processing framework?

I want to use R scripts from the module Sextante treatment QGIS , but I have many difficulties to configure the module in Sextante . Following the procedure described in the official documentation of ...
1
vote
0answers
22 views

Lagrange Multiplier in lm.LMtests (spdep package for R)

Are the Lagrange values comparable in lm.LMtests? If both RLMerr and RLMlag are significant, would the test with the largest Lagrange value be considered 'better' at explaining the spatial ...
1
vote
0answers
31 views

Analyse effect of groups on raster maps

I work with a mechanistic model that uses climate data to simulate some specific output for different time steps and spatial locations. Now I want to investigate the effect of different climate data ...
1
vote
0answers
44 views

Display followers count on Google maps using R

How can I plot the count of followers, locations wise on google maps - Im using R language my data is as below: for(i in 1:25){print(friends_obj[[i]]$location)} [1] "London & Glasgow/Edinburgh, ...
1
vote
0answers
62 views

Write raster with its attribute table and symbology

I am classifying lots of rasters and I'd like to automate the legend creation and symbology displaying for easy manipulation. Here is the kind of raster I'm dealing with: library(raster) r <- ...
1
vote
0answers
41 views

TPS and Kriging Cross-Validation

I am looking for existing package or functions that will allow me to cross-validate multiple outputs of Thin plate spline (TPS) and Kriging from the fields package. Does anyone know of any availabe ...
1
vote
0answers
67 views

Making spatial clusters by direct manipulation of raster pixel values using R

I think this is an overambitious million dollar question, but I'm always optimistic when I pose a question even though I feel like I left no stone unturned! I've processed a raster layer with pixel ...
1
vote
0answers
101 views

Mapping Kansas City based on X and Y Coordinates in R

I have a csv file in R that has coordinates of Kansas City, however, the values at these points aren't in any traditional longitude/latitude formatting that I am aware of. My data looks like this: ...
1
vote
0answers
68 views

level of spatial aggregation of polygons

I am looking for a method that allows me to obtain the spatial aggregation of polygons for each cell of a grid with 10kmx10km resolution. In each cell (10kmx10km), I want to be able to consider that ...
1
vote
0answers
124 views

How to import binary arcgis maps into R

I have imported arcgis rasters into R. The rasters are binary maps and the legend in arcgis shows this to be binary as the colors are only 0 and 1. Now, when I import the raster into R it is no ...
1
vote
0answers
188 views

Ordinary kriging with three dimensions in R

I want to interpolate temperature for a surface defined by three coordinates: longitude, latitude and altitude. I know one option is to use universal kriging on two dimensions and use altitude as a ...
1
vote
0answers
423 views

Validation of Regression Kriging

I am interested in exploring the idea of generating a predictive model for a target variable in a spatial context. I would then like to correct the residuals of this model using kriging, i.e. in a ...
1
vote
0answers
97 views

kriging Error dimensions do not match: locations xxxx data yyyy in R

I've been working (for hours) on a kriging problem. When I run an ordinary kriging model: y.ok <- krige(y~x, locations=data1,newdata=data2), I keep getting the message: Error dimensions do ...
1
vote
0answers
419 views

How to clip the contour map with the polygon using R software?

Hi I am wondering how can I create the contour lines from the discrete x, y and z dataset and then add the shapefile to cut the contour lines by polygon. I want to clip the contour map by the shape ...
1
vote
0answers
674 views

Raster grid for zonal statistics in R

I have two raster layer, the first one r is my zonal mask as a raster grid, and I created as: ext <-extent(Yraster) r <- raster(nrows=32,ncols=32,ext) r[] <-(1:ncell(r)) and project it ...
0
votes
0answers
15 views

Neighbours list extracted out of polygon regions

I've got a SQL database which contains some coded polygon structures. Those can be extracted as follows poly <- data.frame(sqldf("SELECT ST_astext(geometry) FROM table")) The data.frame 'poly' ...
0
votes
0answers
49 views

NAs not allowed error message in attempt to plot raster object in R

I have imported a clipped raster (performed in ArcGIS 10.1) from the National Landcover Dataset into R, but when I try to plot I get the following error message. Error in .readCellsGDAL(x, ...
0
votes
0answers
21 views

Cannot properly import MODIS MOD07_L2 .hdf files into R using rgdal

I've been trying to accurately import and process some .hdf files from the MODIS Atmospheric Profile product (MOD07_L2) in R for several days now. Still, there's something going wrong during data ...