Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [r]

Statistical computing language and software environment.

0
votes
0answers
10 views

spatial imputation for missing values in multiple variables in shapefile in r

I currently have a shape file with approximately 20 numeric variables. Several of these variables have missing values. As this is a shapefile I do not think using the median or mean as a form of ...
1
vote
1answer
25 views

Estimate the spatial relationship between two sets of points

I have two sets of point data, structured like below. Table A long | lat | class ... | ... | A ... | ... | A ... | ... | A Table B long | lat | class ... | ... | B ... | ... | B ... | ... | ...
0
votes
0answers
25 views

Error in compareRaster(rasters) : different extent

I'm preparing independent raster for LR model: the resampled rasters files: Aspect=raster("resampleData/Aspect_re.tif") Curvature=raster("resampleData/Curvature_re.tif") Elevation=raster("...
0
votes
1answer
19 views

Kriging for unevenly spaced points using R?

I started to read about Kriging and the implementation into R. In all the tutorials I found, a (regular) grid is used to do ordinary or universal kriging. My situation is as follows, I try to ...
2
votes
0answers
33 views

TIFF image from R displaying only white in ArcMap?

I cannot get this TIFF image, which was exported from R to display in ArcMap 10.5. I would like to georeference the nodes, but the image only displays as all white. Can someone help me with this? ...
-2
votes
0answers
20 views

Multivariete geostatistical method to describe points location [on hold]

I am doing a larger university project concerning the geostatistical analysis of wind turbines location for a given area (whole country). I was thinking about using Geographically Weighted PCA, but ...
0
votes
1answer
11 views

Stack RasterDataset taking into account the dates between images

Good morning, I would like to stack a raster dataset taking into account the number of days between images. Sometimes the number of dates between observations are 8, 16 or 365 days. Is there any ...
0
votes
0answers
18 views

Edit GeoJSON file: adding countries

I'm using leaflet in R to create an interactive map. I have this map although it has only the United Kingdom, I would like to have the UK: Nothern Ireland and the UK: Great Britain. I would like to ...
0
votes
1answer
17 views

Mann-Kendall test with R

I am trying to do Man-Kendall test over a stack of 620 MODIS images. The code is as follows: library(sp) library(raster) library(Kendall) library(spatialEco) setwd("C:\\NDVI_prueba") rlist=list....
0
votes
1answer
15 views

In R, abstract data from SpatialPolygonsDataFrame but got NA

I tried to extract data from a SpatialPolygonsDataFrame, but got all NA. slot(nc,"data")[c("Northampton","Clay","Macon","Graham","Yancey","Mitchell","Avery"),] The data show as: SP_ID CNTY_ID ...
1
vote
1answer
22 views

IDW/Kriging running slow in R

I have a dataset with 2157335 entries, and I am performing IDW/Kriging to interpolate. But the code is running very slow. I am not sure this is because of a large dataset or there is something wrong ...
0
votes
1answer
28 views

Failure to re-project SpatialPolygonsDataFrame to Equidistant Cylindrical in R (units problem?)

I am trying to re-project a shapefile to match the projection and units o Black Marble nightlights data (link below) which comes in a raster with Equidistant Cylindrical projection, units in meters. ...
0
votes
1answer
26 views

Converting lat, long and values to raster doesn't project correctly

I have a some data like so: x <- c(59.06321, 59.22318, 59.38157, 59.53835, 59.69351, 59.84704, 59.99891, 60.14911, 60.29761, 60.44440, 60.58946, 60.73278, 60.87433, 61.01410, 61.15207, 61.28822, ...
1
vote
1answer
41 views

Plotting/Exporting the Spatial Random Effects in BYM model - CARBayes - in R

I am working with visceral leishmaniasis disease cases in a small city with 100 counties (census tract). I have run a Bayesian Spatial Modeling - Conditional Autoregressive model (CAR) Poisson (BYM ...
0
votes
0answers
26 views

MODIS downloads using Python

I am trying to get a full-functioning download script specifically for the Modis data (Version 6) on the USG/NASA site (AppEEARS/LPDAAC). I’m running Windows 10. I know that there is an R Modis ...
0
votes
1answer
14 views

tauDEM flow accumulation (D8 or D-infinity) results is NA-values for some major rivers

I am having some trouble with tauDEM that I am hoping someone can give me some advice on. I'm running tauDEM via command line through R-studio. I am working with some 30m resolution SRTM DEM data in ...
0
votes
0answers
28 views

Remote Sensing in R: How to classify an image in urban/ non urban areas and create shapefiles of both classes? [on hold]

I want to extract urban areas from a satellite image (Landsat, Sentinel.. doesnt matter) and save them as a Shapefile. Do you know how to do this in R?
0
votes
2answers
76 views

Plot scatterplot of raster stacks in R with ggplot2 [on hold]

I have two raster stacks with 12 layers each (exactly the same extent and pixel size) and I would like to make their scatterplots (a panel of twelve scatterplots) in ggplot2, but ggplot does not seem ...
0
votes
0answers
59 views

Testing occlusion/visibility from point of view? [on hold]

I have a circle polygons spread randomly within the area. I want to test the occlusion/visibility. Is there some easy way to do it? Best in R or some GIS software. Also to use multiple points. But ...
-3
votes
0answers
23 views

Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ‘itemFrequencyPlot’ for signature ‘“tbl_df”’ > [closed]

Association Rule Mining Block 1 : installing Packages install.packages("arules") install.packages("arulesViz") install.packages("datasets") library(arules) library(arulesViz) library(datasets) ...
1
vote
1answer
43 views

Can't extract chlorophyll a values from NetCDF file using R

I'm trying to get the chlorophyll a values from a NetCDF file using R software, but all I'm getting are missing values, NA. I would like to know if I'm doing something wrong or if the file really just ...
0
votes
0answers
36 views

Extracting reflectance values from raster image - Landsat 8

I have created a script in R using the RSToolbox and raster packages. The objective is to extract reflectance values (as matrix) from Landsat 8 image. I am doing this by cropping the area of interest, ...
5
votes
2answers
60 views

Calculating block statistics from land cover raster using R?

I have a raster (5 x 5 m resolution) representing land cover. Each cell contains a integer value (from 1 to 10) representing a total of ten land cover classes (e.g. 1-forest; 2-agricultural areas; 3-...
0
votes
2answers
49 views

Merge RasterLayers (raster package)

i want to change the resolution of elevation data for several countries and them merge those in one rasterlayer. I use getData function from raster package. I tried this one: library(raster) library(...
1
vote
1answer
35 views

Calculating statistics per area for categorical raster using R?

I am working with the area of New York City (NYC) in ArcGIS 10.1. I have a landcover raster map with several different land cover categories. What I am trying to do is to build up a table in which, ...
0
votes
1answer
21 views

R error reprojecting from EASE 2.0 to WGS84

I have a data file which is in the EASE 2.0 grid (EPSG:6933) which read in with raster looks like so: class : RasterLayer dimensions : 3000, 3000, 9e+06 (nrow, ncol, ncell) resolution : ...
0
votes
1answer
61 views

Add nearest coordinates values from one file to another file in R [duplicate]

I have 2 files df1 and df2. File df1 has lat and lon, file df2 has lat, lon and wind. df1 and df2 files have different lat, lon. Now I want to add df2$value2 in the file df2 corresponding to the ...
0
votes
0answers
46 views

Read NetCDF chlorophyll data in R

I want to plot chlorophyll data in much the same way as is shown in the second part of this answer (I can run the first part perfectly with my data but I want a higher resolution map). The only ...
1
vote
1answer
35 views

Assign country names to long and lat in R

I have gridded data on temperature, from which I want to extract data for specific countries. Put it in another way, I want to kind of assign country names to the coordinates (long and lat). The way I ...
0
votes
0answers
24 views

Obtaining different linear entities?

I’m trying to get a shapefile with several feature lines, after export I have the shapefile with its attribute table, it seems to be 56 features. But actually, there is just one, I cannot do selection ...
0
votes
1answer
29 views

Connect points from two SpatialPointsDataFrames in R, considering the closest distance

I have two SpatialPointsDataFrames. In SpatialPointsDataFrame one (dat1) I have three points (A, B and C). In SpatialPointsDataFrame two (dat2), I have eight points with temperature measurements. I ...
1
vote
0answers
16 views

Clipping polygons to existing plotting area

I have an existing plotting area onto which I want to add some polygons. In order to be sure the polygons' labels are displayed within the plotting area, I'd like to clip the polygons to this area so ...
0
votes
0answers
24 views

Drawing extra markers on a leaflet map with addDrawToolbar in R

I have added a Toolbar on a leaflet map to make it easy for non-coders to draw markers. For this purpose I make use of the following R packages: leaflet, leaflet.extras, and shiny. I have a couple ...
1
vote
0answers
48 views

How to add a text on a Leaflet map

Each day I need to draw a path on a map and add a text (like 4, 5 or 8 min) indicating how long it takes by car from the starting point to the destination (see the figure below). I thought it would ...
0
votes
0answers
20 views

Creating sf multiploygon from subset of points in grouped data?

I have a reproducible dataset with relocations of two animals (data below). For each location there is a DateTime stamp and a general season IndYearCorePeriod (Winter, Summer, and None). > head(...
0
votes
1answer
53 views

Create a buffer around points

This is probably one of the simplest GIS tasks to do, but I am struggling. I have tried to adapt this answer but it appears not to work Create buffers around points and merge with ...
0
votes
1answer
31 views

manipulate ASCII grid

I have an ASCII grid (Data information in this box link https://app.box.com/s/jpdalfjnyfhqbvrghd8csu3pz5b2fl2j) with the following projection information Projection POLAR Units METERS ...
1
vote
1answer
32 views

Get R scripts from on-line scripts collection

I have QGIS 2.18 installed on Win 10, I tried to add online R scripts from processing toolbox, but i get errors. "Python error: An error has occurred while executing Python code: See message log (...
1
vote
0answers
19 views

Spatial join in R - Adding points to polygons with multiple corresponding points

I have carried out a spatial join in R in order to join a points shapefile to the corresponding polygon in a polygon shapefile using over() from the sp package and spCbind(). join <- over(polygons,...
0
votes
0answers
23 views

How to style KML through LIBKML layer creation options?

I am exporting a layer from PostgreSQL to KML using the sf package in R - though I am also capable of doing it directly with ogr2ogr. I get a workable KML that looks like this. <Placemark> ...
-1
votes
0answers
19 views

Error in calculation of Moran I [duplicate]

While calculating the Moran I using Moranlocal function for a TIFF image in WGS84 datum, I am getting the following error. Error in (function (classes, fdef, mtable) : unable to find an inherited ...
0
votes
0answers
22 views

How to apply ordinary least squares regression to a raster image?

I need to apply ordinary least squares regression to a raster image and have to calculate three coefficients and Rsquare from it. I am doing it in R. I am not able to proceed further beyond reading ...
1
vote
0answers
23 views

Silence qgis.core error messages in reticulate

I am using the qgis.core Python module in R using reticulate. I start the QgsApplication using the following code. # Start reticulate reticulate::use_python(Sys.getenv("PYTHONHOME"), require = TRUE) ...
0
votes
2answers
47 views

Select multiple rasters from location

I have a lot of rasters (almost 4000) wich are representing individual glaciers in the Alps. I would like to select only the rasters located within the french border. As I have no information in the ...
1
vote
2answers
50 views

Excluding point from Nearest neighbor search once it's been matched using R?

I have two lists of addresses, List 1 and List 2. I want to find the nearest neighbors of the list--but without assigning more than one point to any point. So say point 1A is the nearest neighbor of ...
0
votes
0answers
41 views

Extracting WMS raster values into R

I'm trying to use R to extract values from an ImageMosaic I created in a local GeoServer instance and published as a WMS. The ImageMosaic is made from many GeoTIFF raster files initially in WGS84. ...
1
vote
0answers
38 views

Spatial pattern analysis in R

This is a post originally posted on stacksoverflow, but I was recommended to post it here also. I have a lot of position data from fishing vessels, from where I would like to detect fishing ...
1
vote
0answers
39 views

R colored raster from QGIS to ggplot or tmap

I am fairly new in doing GIS work in R, but I thought this would be a nice situation to get my feet wet. Here is the situation: I need to create multiple plots with the same background, the same ...
0
votes
0answers
18 views

Contour Plot between date, Time and fog in R

I want to make a contour plot with dates on x axis, time on y axis and fog concentration as z values in R software. I am unable to do so. I have converted the dates in POSIXct in dd-mm-yy. I have ...
1
vote
0answers
25 views

Swapping raster bands on disk efficiently using R

I have two raster files, each with RGB bands and an alpha layer. I would simply like to swap one of the raster's alpha bands for another, but to do so as efficiently as possible (these are very big ...