Statistical computing language and software environment.

learn more… | top users | synonyms

2
votes
2answers
83 views

In ESRI ArcGIS, is there an equivalent to the RStudio Console Windows?

UPDATED I know ESRI provides scripting capacity, via the Python window, but I've had a hard time with it. Making the jump from the Field calculator to the Python window was too much to me. Trying to ...
1
vote
2answers
41 views

Is there an R equivalent of NEAR in ESRI ArcGIS?

I have 54 points in one data set A I have 300+ data points in a dataset B. I wish to find the distance for each point in dataset-set B, to points in dataset A. Nearest Neighbor packages appear to ...
2
votes
1answer
30 views

comparing and finding inaccuracies in two raster layers

I have two raster layers with urban cells and rural cells. I used an overlay function to compare these two raster layers and see the differences. Before overlaying I gave urban cell the value 1 and ...
1
vote
2answers
49 views

projection differences in R

I am trying to reproject some climate data that I downloaded from http://gdo-dcp.ucllnl.org/downscaled_cmip_projections/dcpInterface.html#Welcomein The BCSD-CMIP5 data is found under the tab ...
1
vote
0answers
43 views

How to define the output raster resolution when rasterizing a vector?

I have a vector file which I want to rasterize and adjust its resolution to the reference map, in QGIS. I tried spatial_sync_raster function in R to set all the rasters into the same resolution as ...
1
vote
1answer
26 views

gTouches error without geometry error?

I have a map showing administrative boundaries (available here). I've loaded it into R and have attempted to run gTouches (from rgeos) to determine which areas are adjacent to which, but receive an ...
2
votes
2answers
29 views

combine rasters into single raster with multiple field values in R

I have several raster brick objects that I would like to combine into one raster with multiple field values for each cell, but I am not sure how to do this in R. For example, let's say I have two ...
7
votes
3answers
174 views

Best way to make a fake hillslope?

Anyone ever have to make a fake hill slope? or a fake digital elevation model (DEM)? What are the best methods for doing so? For more specifics, suppose I wanted to make a fake hill slope, that was ...
2
votes
0answers
21 views

kriging of compositional data (grain size)

I have posted this already in the GEONet Forum but without any suggestions, now I am hoping for some feedback here: I have a problem concerning interpolation of compositional data of grain sizes. I ...
0
votes
0answers
74 views

Creating the Regions based on spatial clusters

I need to create areas for my shapefiles for spatial analysis for each. So I have a number of stations and I created 5 clusters based on the distance. code: Al <- ...
2
votes
0answers
57 views

Raster to polygon using R [closed]

I am trying to convert a raster object to a polygon object using R but I am running into some problems using my Windows 7 machine. I originally tried to use rasterToPolygons (package: raster) but it ...
2
votes
0answers
34 views

How to split a polygon into quadrants in R/Qgis?

I am solving the same problem as How to split a polygon into quadrants?, except that I am looking for a solution in R or QGis. So I have a polygon layer shapefile, which is unfortunatelly not exactly ...
1
vote
0answers
24 views

Unexpected Moran's I value in R using a chessboard example

I'm running into unexpected values for Moran's I when using the Moran.I function in the R library "ape". My understanding is that a chessboard is an example of perfect negative spatial ...
10
votes
3answers
254 views

From polygon to continuous measure of diversity?

First of all; I have tried to find a similar question, without success. Maybe it's because I'm quite new to GIS and I don't really know what exactly I'm looking for. If someone points me to a similar ...
3
votes
1answer
51 views

Convert coordinates from readShapePoly in R to long-lat coordinates

I'm trying to find some centroids of a shapefile for Danish municipalities and afterwards find the driving time between them. I use R's readShapePoly function from maptools combined with the ...
2
votes
1answer
60 views

clustering map (North, Centre, South) in R

I am looking for a method to partition map in 3 groups (North, Centre, South) like this: how to do this in R please stations.txt Code : Al <- shapefile("DZA_adm/DZA_adm0.shp") # read in ascii ...
2
votes
0answers
46 views

How to merge an excel file with a shapefile in r

I am new to mapping in R so my question might look trivial. I want to have a density map of US for number of phone calls for different areas. Each area includes some zip codes. I only have number of ...
1
vote
1answer
44 views

Legend and coloring of markers with plotGoogleMaps in R

I have a data frame (X) that looks like this: code cluster name longt latit 101 1 A -89.6171 35.24992 105 1 B -90.0154 35.10510 106 2 C ...
0
votes
0answers
43 views

How to solve coordinate differences between packages

I have two maps generated by two different methods. The first, I used maps package and the function map() and symbols(). On the other hand, I used the ggmap package with the ggmap() and geom_point() ...
2
votes
1answer
40 views

Unsupervised classification with kmeans in R

I have a time series of satellite images (5 bands) and want to classify them by kmeans in R. My script is working fine (loop through my images, convert the images to data.frame, cluster them, and ...
1
vote
1answer
29 views

Aggregate table with dates and average geographic coordinates

When SOG is 0 Stops gets 1. When the next SOG is 0 then Stops gets 2 and like this consecutively. Now I want to group all the rows where SOG != 0. The trick is that I should have the following ...
0
votes
0answers
45 views

Assign CRS to shapefile in R

I imported my shapefile dat to R with readOGR, coordinates are given in easting and northing, I'd like to change it to latlon and tried: dat_latlon <- spTransform(dat, CRS("+proj=longlat ...
1
vote
1answer
37 views

R geographically weighted regression GWModel

I am exploring the use of GWmodel to run some GWR regressions. I set it up and tried to run some sample regressions using the gwr.basic function, but ran into the following error, Error in t(X * W.i) ...
1
vote
2answers
63 views

Extract values from raster into points: data loss using extract function from raster package

I am trying to extract values of raster cells on points using extract from raster package in R (similar to 'Extract Values to Points' in ArcGIS-10.2). After doing so in order to check integrity, I ...
0
votes
1answer
31 views

Spplot labels in R how to change

Can anyone tell me how to change the labels in a legend created by spplot in R? It is a typical vertical ribbon legend automatically generated by spplot. Based on color, it is labelled 1-7 but I ...
0
votes
0answers
76 views

How to prevent cross-world lines in ggplot world map?

I'm having issues displaying 'great circles' paths and polygons in ggmap, an extension of ggplot2. Please enter the following code to replicate my issues: ...
5
votes
1answer
145 views

Cell declustering using open-source software

I want to perform cell declustering in a small point data set. I have 9 observation points and I want to find the size of the region of influence for an observation, and afterwards use that as ...
2
votes
1answer
56 views

Export band names with NetCDF file in R

I am using R to work with multiband raster files and am running into a problem. I have named the bands, but when I export in netcdf format, the band names are being stripped. Anyone know how to ...
2
votes
1answer
36 views

average certain raster cells in R

If I have two rasters, let's say x1 and x2, that are the same dimensions, how can I take the average of the two but only where both have data to have a third raster x3 that is a composite of the first ...
2
votes
2answers
52 views

Is there a county-level maps dataset that includes independent cities in virginia?

and thank you in advance for your help. The following code shows the dataset I am working with: library(maps) CountyMapData <- map_data("county") head(CountyMapData) long lat group ...
4
votes
2answers
33 views

How can I snap one set of points to another in R

I would like to snap one set of points (SpatialPoints* objects) to another in R using Euclidean distance. I'm hoping for a function like maptools::snapPointsToLines. The attributes of the points ...
0
votes
1answer
84 views

R custom color theme in levelplot

R range(diffRain) [1] -2.59 7.59 How can I code a color ramp following ways? red color ramp less than 0.0 blue color ramp greater than 0.0 This is a part of my code. myTheme <- ...
6
votes
3answers
254 views

1km circles around lat-long-points in many places in world

I have hundreds of lat-long-points spread around the world, and must create circle-polygons around each of them, with radius exactly 1000 meters. I understand the points must first be projected from ...
1
vote
1answer
73 views

Creating new shapefile after merge operation using unionSpatialPolygons

I only recently started playing with shapefiles and R packages for manipulating them. I am looking at creating a new shapefile based on merged polyons by following this example, however, I cannot seem ...
1
vote
1answer
24 views

How to reproduce contour-style labeling with rasterVis::contourplot?

I am currently working with a digital elevation model (DEM) of Mt. Kilimanjaro, Tanzania. The referring raster grid can be downloaded from DIVA-GIS (Country: Tanzania; Subject: Elevation). After ...
2
votes
1answer
91 views

How can i use Kriging inside a Postgis database?

i use a postgis database with temperature data. I want to use a spatial interpolation method but not the supported IDW Method. I need to use the kriging Method. Problem is that its no a part of the ...
3
votes
0answers
20 views

How to set m parameter of clusterR function in R?

I want to manage a clustered computation on raster and thus use the "clusterR" function in R (package 'raster'). However, there's a tuning m parameter to set, but the only explanation about this ...
1
vote
2answers
52 views

Count values greater than 0 in SpatialPolygonsDataframe R

I have a SpatialPolygonsDataframe with > 100 layers and I would like to get a single layer showing the total count of where the values of all the layers are greater than 0. I have tried converting to ...
-1
votes
1answer
52 views

conversion of .img to binary file using R

I have a series of raster images which have to be converted to binary files. I request you to suggest a R code for conversion of all files at a time
3
votes
0answers
49 views

Algorithm to find the boundary grid points [duplicate]

Let us consider a set S consisting of a collection of grid locations (i,j),i,j=1,\ldots,n, in 2-dimensional gridded plane. Here the point (i,j) corresponds to a rectangular grid in the X-Y plane. ...
2
votes
1answer
36 views

Randomly distributed cases according to census data

I'd like to randomly place a point within a geographic boundary with the caveat that I would like to use census data so that points are randomly placed according to population density (i.e. more ...
1
vote
1answer
102 views

Plotting NetCDF file using lat and lon contained in variables

I am trying to plot this NetCDF file (and similar) as a 2d contour map. The file contains a single layer of one variable, "pr". The file has 413x229 X-Y pixel coordinates, and, stored inside the ...
2
votes
1answer
41 views

What can I use for Territory Management in Canada?

For our Canadian organization, I would like to map out the Postal Codes for each sales rep on a map. I've so far used R to pretty good success, but it completely lacks the interactivity I need to ...
1
vote
2answers
109 views

Inserting a zoomed-in plot with a full scale plot in the sp package in R

I am using the sp package in R to plot sampled points along a river. However, I would like to zoom in to a sampled area of the entire river, and plot this zoomed area on the full length of the river. ...
0
votes
2answers
102 views

How to plot the US maps with selected locations (longitude and latitude of the locations are known)?

I've been struggling with the following R plotting of the US map and wonder if any of you have suggestions on how the plot should be done. Here is what I have tried: US <- map("state",fill=TRUE, ...
-1
votes
2answers
76 views

Non Matching Rows between 2 txt files [closed]

I need to compare 2 CSV files so that I can get the missing rows from each CSV. All column attributes in each row should match while comparison. So I have 2 txt files and I would like to compare one ...
0
votes
1answer
138 views

CSV Format change [closed]

Breakline Input File, Breakline Output file I get a breakline file from a CAD guy in below mentioned format. So I am calling this as a “Input” file. I am calling this as a “Output” file. I would ...
0
votes
1answer
66 views

Multiple Subsetting

Input File, XY min,max file I have a XYZ .csv file for a large portion of an area. I have another txt file which contains Box numbers, Xmin, Ymin, Xmax, Ymax. I would like to export a CSV file for ...
0
votes
1answer
45 views

how to convert list of stack images to timseries files in R

Iam using bfast package for time series analysis. But it requires the files to be read as timeseries Problem: How to convert list of stacked images from 2000 t0 2013 into a time series and given as ...
2
votes
0answers
31 views

how to display the legend when the map contains external icons in R

I haven't found anything about the legend when the map contains icons external R (in png), is't possible to use the legend function or another function in R.