Statistical computing language and software environment.

learn more… | top users | synonyms

6
votes
1answer
913 views

Batch geocoding in R

I need to find a package in R or source code in R that performs batch geocoding using Bing, Yahoo, OpenStreetmap. Do you have any suggestions?
6
votes
1answer
105 views

How to make a wedge shapefile in R?

I'm quite okay at R programming, but fairly new in GIS (especially in R). I have a set of coordinates and I'd like to create a custom shape around them. What I want to do step-by-step: Create a ...
1
vote
0answers
26 views

Batch Geocoding in R over daily limit with pay as you go? [duplicate]

I have found the the geocode function in ggmap to be very helpful in the past. Now I am trying to geocode about 60,000 addresses. The google maps API daily limit is 2500. Google offers a "pay as you ...
-2
votes
1answer
453 views

How can open a shapefile using R maptools package? [closed]

library(maptools) mn.map.shp = readShapeSpatial("minnesota.shp") Results this error at second line: Error in getinfo.shape(fn) : Error opening SHP file
18
votes
3answers
4k views

Using R with ArcGIS Desktop

In response to comments below, a re-phrasing of the question. I've used the integration of R with QGIS, and found it a very uesful tool. Having taken a look at the R toolbox extension for 9 and the ...
5
votes
0answers
124 views

Interpreting semivariogram high nugget

I made a semivariogram in R using package gstat, variogram() function. I want to see if there is spatial autocorrelation in the residuals of my model (species abundance as a function of habitat, ...
6
votes
1answer
370 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 ...
0
votes
1answer
43 views

Exporting “pennLC” object stored in R as a shapefile

I need to export the pennLC object from package:SpatialEpi as a shapefile. pennLC contains different components of lung cancer dataset for Pennsylvania state such as: $geo, a data frame $data, a ...
-1
votes
1answer
138 views

How to read metadata file from R [closed]

How to read metadata file parameters( like sun elevation,REFLECTANCE_MULT_BAND etc ) from the user interface or from R How can end user validate the parameter of metadat file(.mtl) How can I pass ...
3
votes
2answers
109 views

How to remove bounding box extents based on reflectance values of the image of Landsat8 by using R programming

I have taken the reflectance image from Landsat8 bands. Now the extents of bounding box showing negative values , to proceed to my next level of the process i need to remove this negative values and ...
2
votes
0answers
50 views

About shp for ggmap in the R

I am a new in R and GIS, so I kindly ask you on advice. I had a shp which I want to plot on google map. The shpfile is here: http://www.filedropper.com/exercisestanddata First I do this: ogrInfo(...
6
votes
1answer
3k views

How to intersect lines and polygons in R?

Following on from an answer about intersecting polygons with lines to chop up a polygon into smaller polygon units (in QGIS), I wanted to try the same thing in R. However, I cannot seem to find a ...
2
votes
1answer
1k views

Using Regression Trees in ArcGIS

I have a follow up question to Statistical analyses for survey against raster? I have a very similar problem as the initial poster David. I am creating a multivariate model from raster data in order ...
-2
votes
1answer
419 views

How to calculate statistical NDVI in R (for Landsat8) [duplicate]

Is there any function to calculate statistical NDVI in landsat8 package
-1
votes
2answers
503 views

unable to find an inherited method for function ‘writeRaster’ for signature ‘“SpatialGridDataFrame”, “character”’

Error in (function (classes, fdef, mtable) library(rgdal) x<-readGDAL("LC81360442014322LGN00_B5.TIF") z<-reflconv(x,2.0000E-05,-0.100000) writeRaster(z,filename="test.tif",format="GTiff",...
0
votes
0answers
87 views

Variogram to assess spatial auto-correlation in grouped surveys in R

I have a large dataset with coordinates of survey locations, and results for presence or absence of a species. These surveys are spatially clustered, with four in a line separated by 1km each, and the ...
1
vote
0answers
19 views

How can I quantify whether locations of one 'type' are closer to one another compared to a second 'type'?

This might have an obvious answer but I'm new to GIS and can't seem to find the right technique... I've got GPS points for a bunch of households and have calculated the distance (in km) between each ...
6
votes
1answer
139 views

Segmentation of a big raster

I'm actually trying to convert one raster into a SpatialPolygons. I've got a big raster (12 millions pixels) with a lot of zeros, and some negative values (representing some depression in a DEM). I ...
0
votes
1answer
45 views

Debugging spplot() and reflconv() on R Cannot allocate vector of size …?

I am trying to perform LANSAT data of Digital Numbers (DN) to reflectance in R(coding) using reflconv(). When I apply that function to example it shows below error: >library(rgdal) x <- ...
3
votes
1answer
118 views

Define cellsize from spsample in meters

I use a shape file to create a regular grid using spsample, from sp package. Two problems here: (1) I would like to define the size of my grid cells in meters, but I've checked the documentation of ...
1
vote
1answer
919 views

Saving output from automap package in the ESRI ASCII raster format

I would like to save the information generated from an ordinary kriging (processed with the function autoKrige from the automap R package), into a file extension readable in ArcGis for desktop 9.3.1 (...
0
votes
0answers
82 views

Union overlapping shapefiles (poylgons) and merge the attributes where overlap occurs in R

I have 30 shapefiles of overlapping polygons and would like to union them into one shapefile. The attribute table of the 30 layers is exactly the same (two columns, Type and Origin). A new polygon ...
1
vote
1answer
279 views

Using Loop for calculating NDVI

I am using MOD09Q1 now and I would like to calculating NDVI whole year data. One year, I have 46 band 1 images and 46 band 2 images. list.files I creating list of band 1 and list of band 2. ...
1
vote
0answers
55 views

Using errorsalm() from spdep with multilevel data?

I have a dataset that has multiple observations per county, and I am interested in estimating the effect of a county-level variable on individual-level outcomes. I would like to account for adjacency ...
2
votes
2answers
2k views

Opening .lyr file via rgdal/OGR

According to this answer I can read in a .lyr file via OGR as long as it was made with ArcGIS version 10. I have such a file (from the ArcGIS Maps & Data page) but I can't quite make R's readOGR ...
0
votes
1answer
96 views

How to extracting values of 40 plots from different bands of raster image in R?

I have 40 plots(samples) and I want to extract corresponding values from different bands of RapidEye image. So at the end I want to have totally 200 values of 5 bands in the format of txt. Till now I ...
3
votes
1answer
116 views

Find which latitude and longitude values are falling in which raster cells

I am an absolute beginner in analyzing geographic data with R. I have a database with longitude and latitude of around a million buildings in a country. I would like to find the average density of ...
1
vote
0answers
67 views

R raster stack 4 dimensions

I am trying to create a raster stack / brick from a list of ncdf files with the dimensions 160x160x24x1). r = stack(files) This gives me a raster stack but without the 4th dimensions which is ...
2
votes
2answers
81 views

How can I use a DBF layer in an R script in QGIS?

How can I use a DBF layer in an R script in QGIS? For example, I can input a vector by using ##Layer=vector, and a CSV table with ##Table=table, but it will fail if the table is based on a DBF file. ...
3
votes
1answer
3k views

merging 2 polygon adjacent to each other using R

I have several shp files which are the components (or tiles) of a map, I have joint all these tiles together to have a large shp file. Then I realized some of the polygon is now split into 2 halves, ...
-1
votes
1answer
111 views

Single point in R

My question might be very simple. I want to create a single point (with xy coordinates) in a specific region, in a specific position. I don't want to do that with qgis I want to do that in R. Is there ...
1
vote
0answers
156 views

Can you check if a gps coordinate is inside a gps polygon in R?

I'm trying to determine if a specific gps coordinate is within a gps spatial polygon. My gps coordinate is being outputted from the geocode function from the ggmap library and the spatial polygons ...
1
vote
1answer
42 views

The shape does not fit the ggmap

I try to fit my shape to the google map. require(rgdal) in.dir <- getwd() sh <- readOGR(in.dir, layer = "Ytor", p4s = "+proj=tmerc +lat_0=0 +lon_0=15.80827777777778 +k=1 +x_0=1500000 +...
17
votes
7answers
2k views

Speed of various raster data formats

I'm having trouble locating any discussion or comparative benchmarking of different raster file formats (e.g., for use in data analysis in R). Does anybody have any insight into why particular formats ...
4
votes
2answers
681 views

Randomly sampling points in R with minimum distance constraint

I'm trying to randomly select a number of points within my data frame (example data below) with a constraint that the minimum distance between the selected point must be greater than a certain ...
2
votes
2answers
1k views

How do you geocode addresses in R? [duplicate]

I'm wondering how to geocode addresses in R Studio ? Is there a link to Google Developers API ?
3
votes
2answers
536 views

How to link R script to Algotithm output in QGIS modeler?

I constructed a simple R script for QGIS modeler (.rsx) that calculates groupwise summary statistics of a vector layer table (sum by field "subject" and "FRC"). The script correctly works. When ...
0
votes
1answer
70 views

How can i plot this piece of code with ggplot2? [closed]

I have these vectors of the lakes in New Guinea and the coastline and i want to plot it using ggplot2 exactly as it follows but with a more cool appearance. co<-coastline.shp nglakes<-lakes....
6
votes
1answer
2k 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 ...
2
votes
1answer
1k views

Why is my stacked area graph in ggplot2 returned as stacked lines? [closed]

im having a bit of a problem creating my stacked area chart in ggplot2 in R, for some reason it is returning as a stacked line; eg data: library(ggplot2) Sector <- rep(c("S01","S02","S03","S04","...
1
vote
1answer
43 views

Unexpected Isopleth Output From GME

I converted a csv file to projected SpatialPointsDataFrame in R, input it to bkde2D, converted the result to raster, saved the raster to a TIFF, and input that raster into the GME Isopleth tool. Here ...
2
votes
2answers
267 views

Selecting features within polygon from another layer using R or Python?

For Selecting features within polygon from another layer using QGIS? the solution was to: use the "Vector->Research tools->Select by Location" However, I would like to know how to do the same ...
2
votes
2answers
3k views

Built a query for polygon Shapefile in R

I use the package maptools to read in Shapefiles in R. I would like to know if there is a function that can built up a query/subset to select only some Polygons based on a specific attribute in the a....
0
votes
1answer
102 views

KDE looping in GME

I can not get this for loop to run in GME because i is being changed to 1 and , out is not recognized: wd <- "C:\Users\name\Desktop\KDE\2011\"; for (i in 1:15) { kde(in="C:\Users\name\Desktop\KDE\...
0
votes
0answers
41 views

Interpolate Points with GAM-Model

I'm trying to interpolate some point-data to a raster-map. Until now i used kriging to interpolate the point-data to the surface. now i have to use a generalized additive model for that task. my ...
3
votes
1answer
362 views

Reading and plotting shapefiles with a custom function in R?

I have this piece of code that want to turn into a function r <- readShapeSpatial("roads") b <- readShapeSpatial("buildings") lc <- readShapeSpatial("landcover.shp") here is the ...
1
vote
0answers
69 views

Creating grid from spatio temporal point data? [closed]

I have a spatio-temporal point data of species sighting with monthly observation for random locations within my study area. I wish to create a grid(fishnet) for each month for each year. Also, certain ...
1
vote
1answer
71 views

Zooming into State

I am using R LeaftLet package to create a interactive choropleth of the US Map. Now my question I want both in one map itself but make zip code visible as I zoom in a state or double click on a state....
0
votes
0answers
118 views

Adding additional data to R maps - package data

Is there a way to add data to additional_data result set obtained from below line of code from R maps package? additional_data <- map('county', 'iowa', fill = TRUE, col = palette()) Above ...
1
vote
0answers
101 views

Delineate watershed using manual points in RSAGA

I'm currently trying for an automated solution to delineate watersheds within a large basin. I have a collection of locations (X,Y coords) for various tributaries reaching a larger river, and the end-...