Statistical computing language and software environment.

learn more… | top users | synonyms

3
votes
0answers
51 views

Resampling air temperature gridded data to sub-grid resolution

I'd like to obtain a 30-m resolution gridded dataset of air temperature from the ~1km gridded data of WorldClim, of Hijmans et al., 2005) for a mountainous region. The easiest procedure (I thought ...
1
vote
1answer
89 views

Problem in creating neighbors, area and perimeter in spatial econometrics using R

I’m working on a spatial cross section model with R-programming-language. I’m running these codes which refers to anselin data (spatial_columbus) in spdep package. I found them from these links: ...
0
votes
0answers
37 views

Doing joint hypothesis test in spatial regression using R?

I'm doing estimation of spatial lag/error model using R package "spreg"/"spdep" but I cannot find any method to do anhypothesis test after regression. For example, I want to test whether two ...
1
vote
1answer
133 views

How to open and plot Globcolour chlorophyll image in R?

Level 3 globcolour chlorophyll images (download from hermes) are in netCDF format. Those files can be imported via ncdf package to R 3.1. ch.nc = ...
5
votes
1answer
163 views

Fixing orphaned holes in R

I'm trying to perform a union on a common field after merging two adjacent shapefiles. The shapefiles end up with at least one thin sliver of space between them. When I attempt a union I get the ...
4
votes
4answers
170 views

Create a rectangular buffer from point shapefile using QGIS/GRASS/SAGA GIS/R

I have a points shapefile and I want to create a rectangular buffer (22 x 16 km) around each point. My goal is to create a 16x22 km grid where each of the points is the centroid of the grid. Seed the ...
1
vote
2answers
212 views

Avoiding R for windows gui front-end has stopped working error?

I am trying to load huge number of points (shape file) in R. But when I load it, the program displays following error message and just stops. "R for Windows GUI front-end has stopped working" My OS ...
2
votes
1answer
67 views

How to create header files for multiple rasters in R

I have nearly 1000 generic binary images, i.e., headerless, band sequential and binary (16-bit signed integer). I have been succesfully able to load these with package 'raster' only when I create an ...
1
vote
1answer
58 views

Adding a grid and selecting random cells from spatial polygon in r

I have a fairly similar question to this: Similar Question I am working with a map of Denmark or more a subset of a Denmark Map. This file comes from the Global administrative areas site GADM site ...
2
votes
0answers
78 views

Plotting Bare Soil Line on landsat data in RStudio?

I am using RStudio with landsat package for computing and plotting the Bare Soil Line (BSL) on landsat tif image running on my HP Pavilion i7 laptop. The codes for running the BSL() function is as ...
4
votes
1answer
131 views

Why covariance values are different in R and ArcGIS?

I've calculated covariance between 7 rasters using R and ArcGIS. It gives me different results. Each times covariance values from R are approximately 1.874 times higher than ArcGIS values. R - ...
0
votes
1answer
90 views

Extract single datapoint from netCDF file in R using ndcf

I'm trying to extract a single variable from a 3-dimensional netCDF file. [1] "file blah.nc has 3 dimensions:" [1] "longitude Size: 200" [1] "latitude Size: 100" [1] "time Size: 2000" [1] ...
3
votes
2answers
115 views

How to iterate through features in a shapefile using R?

I am interested in iterating through a point shapefile to perform tasks on a point by point basis using R. In Python, this can be accomplished using the following workflow: import arcpy shp = ...
3
votes
2answers
66 views

Counting number of points in particular polygon for list of individuals using R?

I have distribution points for a set of individuals and a file of polygons-with matching IDs. What I would like to do is to go through and for each individual find the total number of points and the ...
4
votes
2answers
72 views

Map location of unknown point with distances to two known points

I'm trying to develop a function in R that will locate a point (A) on a map given distances between that point A and two other points (B and C), for which exact coordinates are known. The problem I'm ...
0
votes
1answer
39 views

How to batch export using r.out.gdal command in GRASS

I created a list of files (NPPFILES) using g.mlist command in GRASS 7. Now I would like to export these files as .tiff files. I tried this command in GRASS prompt for files in $NPPFILES; do ...
1
vote
0answers
60 views

Calculating surface and lines in 3D projection in R

For my internship research I am trying to compare the surfacearea and length of geometric shapes and lines in one coordinate system to another. I have a SpatialPolygonDataFrame in the European equal ...
4
votes
1answer
142 views

Convert ESRI Shapefile to Raster using R - biggest polygon area to raster cell value?

I want to create a raster from an ESRI shapefile. Multiple polygons may exist in one raster cell. If so, I want to assign the attribute variable which occupies the biggest area of the raster cell. ...
1
vote
0answers
58 views

Rounding off coordinates in an SpatialPolygonDataFrame in R

EDIT AFTER COMMENTS After a comment of Whuber (Thank you!) I realized it will probably be most easy to incorporate a round(...) statement within my code to be able to work with less decimals. ...
0
votes
0answers
42 views

How to reference a number variable in r.mapcalc within QGIS graphical modeler

I need to run the following formula in r.mapcalc: (xor(abs(A-B),abs(A-C))>120)*A I would like to however use a user defined number input variable instead of the 120. I already have this variable ...
2
votes
1answer
63 views

Is this a known issue in gaps between masked raster and spatial polygon in R with mask command?

This is my codes raster file: RAD polygon(shape): ws_sfc RAD.sub <- crop(RAD, extent(ws_sfc)) plot(RAD.sub) RAD.sub <- mask(RAD.sub, ws_sfc) plot(RAD.sub) plot(ws_sfc, add = TRUE) ...
0
votes
0answers
18 views

Kernel Density Analysis using R and ArcGis [duplicate]

I am doing some Kernel Density Estimations, and like everyone elese I face difficulties with setting the bandwidth to create georeferenced rasters. ArcGis (10.1) does it just fine, but it has no ...
2
votes
1answer
107 views

Plotting species distribution on map in R

I'd like to plot the distribution of a species on a map of Switzerland, following this tutorial. library(maps) library(mapdata) map('worldHires', 'Switzerland', xlim=c(5, 12), ylim=c(45,48)) From ...
1
vote
0answers
106 views

Unable to access R from QGIS 2.4

I have been unable to run R from within QGIS on my computer. I have R version 3.03 installed and QGIS 2.4 on Windows 7. R is located at C:\Program Files\R\R-3.0.3\bin\and this is the path e specified ...
3
votes
0answers
53 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. ...
1
vote
0answers
38 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 ...
2
votes
0answers
70 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 ...
1
vote
2answers
114 views

How to produce “SpatialPixelsDataFrame” from stacked RasterLayer?

How to produce "SpatialPixelsDataFrame" from staccked RasterLayer ? I have a stacked rasterlayer and I want to convert them to SpatialPixelsDataFrame. RasterLayer information is > RAD.all[[1]] ...
0
votes
1answer
51 views

going from hillshade to percent shaded (gdaldem)

I assumed hillshades output percent shaded (scaled to 255) at the given azimuth and altitude but this is incorrect. A flat raster at 80 degrees altitude has a maximum value of 251 instead of 255. How ...
1
vote
1answer
155 views

create the postGIS table error No such driver: PostgreSQL

I'm trying to create the postGIS table with spatial features I can do it by: library(RPostgreSQL) library(spacetime) library(rgdal) dbname = "geodatabase" user = "postgres" password = "***" #password ...
2
votes
1answer
74 views

How to assign CRS to RasterLayer in R

I have a layer with coord. ref. : NA. How can I assign coord. ref. : +proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0 to coord. ref. : NA? class : RasterLayer dimensions : ...
0
votes
3answers
222 views

Import shapefiles on my postgis table using R

Using R, I would like to import shapefiles that are in a directory on a geometric table i have on postgresql / postgis. What is the instruction that allows me to do it? EDIT: here is my code to ...
3
votes
1answer
115 views

Max cell value from a stacked raster

How can I find a max cell value from a stacked raster. Rmax <- maxValue(RAD1998.all[[1]]) works fine but Rmax <- maxValue(RAD1998.all[[2]]) gives NA. Of course not in a stacked raster. ...
3
votes
1answer
92 views

How to overlay a county boundary on a raster file?

I want to overlay California county boundary top of raster layer. Here is is my code: data(coastsCoarse) data(countriesLow) library(gtools) library(maps) library(maptools) library(sp) # Raster ...
3
votes
2answers
141 views

How are kappa and overall accuracy related with respect to thematic raster data?

I recently calculated kappa (using confusionMatrix{caret} in R) between a thematic raster dataset at 1m spatial resolution and another at 30m spatial resolution. I was interested in quantifying the ...
2
votes
2answers
129 views

Join CSV file to shapefile

I wanted to join a CSV file to a shapefile. When I identified a field to facilitate the join, e.g., map <- spChFIDs(map, as.character(map$ID)) it returned Error in spChFIDs(SP, x) : ...
1
vote
1answer
116 views

Counts the number of points in a polygon in R

I have two classes sharing the same CRS (Latitute and Longitude): bolognaQuartieriMap: a SpatialPolygonDataFrame containing data of a city boroughts. crashPoints: a SpatialPointsDataFrame containing ...
2
votes
1answer
123 views

Levelplot(RasterVis) two marginal plot scale?

How can I add/display scale to two marginal plot? RAD1998.all <- stack(list.ras) list.files <- mixedsort(list.files(paste(getwd(), "/1998bil/", sep = ""), full.names = F, pattern = ...
1
vote
0answers
56 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 ...
0
votes
1answer
59 views

levelplot index issue

levelplot with static index works fine but not in a for loop. What's wrong with my code? Static index: png(paste("1998",outlist[[1]],".png",sep="")) levelplot(RAD1998.all[[1:4]]) dev.off() ...
0
votes
2answers
141 views

R -plot 12 images per plot or save 12 images per image file in R

Here is R script and my question is How can I plot 12 images per plot or save 12 images per image file because I have total 864 images. RAD1998 <- raster(paste(getwd(), "/1998bil ...
2
votes
0answers
327 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
1answer
172 views

How to remove columns in a spatial polygon data frame in R?

My spatial polygon data frame (spdf) contains too many columns (variables) and I want to remove most of the columns entirely. I know how to do this with a regular data frame in R, but I am unsure how ...
4
votes
1answer
225 views

How to 'reverse clip' (erase) in R

A reverse clip saves only the part of your spatial object that is outside the bounds of another object, as opposed to a regular clip which saves the parts that are inside the other object. Here's how ...
1
vote
0answers
68 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
63 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) ...
4
votes
0answers
74 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 ...
1
vote
1answer
117 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 ...
2
votes
1answer
36 views

How to read ASTER metadata in IDL?

I'm trying to read many ASTER images (1B mainly) in IDL (I can try in R also). I'm used to work with Landsat, but the aster metadata is complicated. I write a code with a lots of conditional that can ...
2
votes
1answer
85 views

Are there examples of high-level interfaces to NetCDF

The R raster package and GDAL both have independent wrappers around NetCDF-4* that treat an array variable as a "complete" dataset, i.e. they provide objects or interfaces that seamlessly give access ...