Statistical computing language and software environment.

learn more… | top users | synonyms

5
votes
0answers
594 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
18 views

Classical or robust variogram for incorporation into generalized linear model

I'm modeling counts of organisms over time at eleven locations. I'd like to account for temporal autocorrelation in the counts, assuming it's present. As the data are not equally spaced in time, ...
4
votes
0answers
362 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
162 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
177 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
350 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
21 views

How to calculate 90% confidence interval in a raster stack

I have a stack of grid files (23) in ASC format from a MODIS sensor and I need to calculate a 90% confidence interval, mean, min, etc, for each one in R, how can I do that? specially the interval. ...
3
votes
0answers
35 views

Multispectral image segmentation for natural-resources applications using R

R has the capacity for image segmentation, although all of the examples I have come across utilize a single band for the segmentation (example). I am interested in combining R's capacity for random ...
3
votes
0answers
31 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
136 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
108 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
328 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
234 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
102 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
162 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
262 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
600 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
244 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
32 views

Using R to subtract the polygon area of one shp file from another

I'm looking to produce a map from two separate maps in R. My Maps files are as follows: ftp://ftp.cpc.ncep.noaa.gov/GIS/us_tempprcpfcst/610prcp_20140822.zip #Map1 ...
2
votes
0answers
50 views

Variogram model fit compatability among geoR, gstat, and nlme packages in R

I'm trying to specify the covariance structure parameters in a linear mixed model (using the correlation structure facilities in nlme). The parameters are estimated from a gstat or geoR variogram ...
2
votes
0answers
86 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
37 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
79 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
75 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
27 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
71 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
86 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
75 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
124 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
223 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
180 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
139 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
240 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
27 views

QGIS using different R lib

I am working with a colleague who is learning QGIS and has a question about the R plugin. His library path (.libPaths()) has two folders: "C:/Users/RDCERWAW/Documents/R/win-library/3.0" "C:/Program ...
1
vote
0answers
39 views

Monte Carlo test of Space-Time clustering in R

I have several point patterns representing the distribution of territories of a bird species. Each point pattern represents the distribution of one year. I already succeeded in computing Ripley's L ...
1
vote
0answers
29 views

spatialpolygons heatmap in R - NAs in grey?

I have a spatial polygon data-frame and I am trying to plot a heatmap via spplot. It's a map of Europe and the values for the heatmap are in a column of the data-frame. Plotting it works fine but I ...
1
vote
0answers
21 views

Not able to bulk download MODIS images

I am trying to download Modis NDVI and EVI images. I have used the following R-code: setwd("/home/karthik/Valmiki/Modis_bands/") library(raster) library(RCurl) ...
1
vote
0answers
14 views

(R)SAGA: saga_cmd 2.1.0 error? inconsistency?

frequently I am using (R)SAGA, but after SAGA became >2.1.0 the R package is no longer working. The last update for RSAGA was 07/2013. Thus I downgraded SAGA to 2.1.0 (first try was skipping the ppa ...
1
vote
0answers
75 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
74 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, ...
1
vote
0answers
27 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
45 views

How do I convert a .bil (and associated .clr, .blw, .hdr, and .stx) files into georeferenced rasters in R? OR to geotiffs using gdal_translate?

The title says it all. I've got a bunch of .bil files, which I can open in R using the raster command pointed to the path to the .bil file. But I don't know how to efficiently incorporate the ...
1
vote
0answers
22 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
37 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
49 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
31 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
32 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
51 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
67 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
43 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 ...