Questions tagged [rstudio]

an integrated development environment (IDE) for R

Filter by
Sorted by
Tagged with
0 votes
1 answer
12 views

R Markdown Knitting Produces Garbage

I don't even know where to begin on describing my problem. I made some maps in R Studio and when I knit the document, it gives me 30 pages of junk. I have selected the options to display the output ...
user avatar
0 votes
0 answers
20 views

Cannot open TIFF due to missing codec in RStudio w/ raster library

Title explains my predicament. I cannot open a tiff file using RStudio's raster library and receive an error that tells me it is due to a missing codec: Code: library(rgdal) library(raster) file_name &...
user avatar
1 vote
0 answers
19 views

Climate prediction using Climate Change Agriculture and Food Security (CCAFS)- Climate Analogues

I would like to know which climate model I can use to predict future climate of a particular area and at the same time shows places with similar conditions at the present. CAFFS-Climate Analogue tool ...
user avatar
0 votes
1 answer
96 views

How to display all the column values of overlapping polygons in leaflet popup with R?

I have intersected points data with a grid in which I would like to display the name of all the species found in every cell. Code sample: library(dplyr) library(rgdal) library(leaflet) library(sf) ...
user avatar
  • 1,237
3 votes
1 answer
51 views

How can I extract cell numbers/dimensions from cell size and extent?

I need to rasterize a SpatialPolygonsDataFrame object. I have a cell size of 100m for my analysis and the raster extent is extracted from the Polygon. But, the problem is that I cannot set a ncol and ...
user avatar
  • 97
0 votes
0 answers
65 views

Problem using lidR functions on Mac

I have been going through LiDAR processing tutorials for R Studio and was successfully able to get through this one by NEON about 4-5 months ago: https://www.neonscience.org/resources/learning-hub/...
user avatar
  • 1
0 votes
0 answers
41 views

Cropping and masking rasterstack to a list of shapefiles

I have a raster stack (nlayers = 366, ncells~10 million). I am hoping to crop and mask this raster stack to a data.frame of coordinates for which I have made a series of concentric circle shapefiles ...
user avatar
  • 23
1 vote
0 answers
21 views

Creating a loop to create NDVI images from raster stacks and naming them from the file name [closed]

I have been trying to write a loop to go through two folders of Sentinel 2 satellite images (Band 4 and 5) and get a NDVI for each date. A stack is created for each band, some cropping and resampling ...
user avatar
3 votes
1 answer
658 views

Splitting MultiPolygon shapefile into separate Polygons in R

I have a polygon shapefile with 2 features. I want to split the MultiPolygon shp into separate shapefiles based on a column of the attribute table. What I've tried so far is this code based on that ...
user avatar
  • 150
0 votes
1 answer
65 views

QGIS filter to get a mesh or fishnet with spaces without information

Can I create a filter with a Python code or R code, to eliminate the spaces that don't belong to the orange shape file? I was thinking in to each shapefile meshed, assign an area from orange shapefile....
user avatar
2 votes
2 answers
161 views

Randomly sampling polygons from polygon grid using the spatialEco package in R

I have a polygon grid (epsg:24381) from which I want to randomly select some polygons. Whenever I try to perform the sampling I'm getting the following error: Error in h(simpleError(msg, call)): ...
user avatar
  • 150
0 votes
0 answers
103 views

Error in bandwidth calculation for Geographically Weighted Regression

I am using the GWmodel package in R to perform Geographically Weighted Regression. I have approximately 100 locations, for which I have calculated the distance matrix named DM using the function distm(...
user avatar
  • 1
0 votes
0 answers
29 views

GWSDAT with R Studio does not read Sample Date from imported Excel sheet properly

When I import an excel sheet, GWSDAT will not recognize the data within the SampleDate column. All cells in that column appear empty within the GWSDAT R Studio window: For context, I have a Python ...
user avatar
1 vote
1 answer
156 views

How to cluster 1000+ points into 50 clusters based on geospatial proximity in R?

Sample data: set.seed(123) lon <- runif(1200, 72.6, 73.2) lat <- runif(1200, 18.8, 19.6) df <- data.frame(lon, lat) Progress so far: geo.dist = function(df) { require(geosphere) d <- ...
user avatar
1 vote
1 answer
158 views

Problem of marker click with Leaflet

I am new using Leaflet with R studio and I have a problem ou both Leaflet markers and map_marker click . The first problem is that , when I put addCircleMarkers in the observer in doesn't work while ...
user avatar
0 votes
0 answers
51 views

TIMESAT Error: Wrong number of sensordata imagefiles

I am a first-time user of TIMESAT, and am attempting to follow along with this tutorial. http://rstudio-pubs-static.s3.amazonaws.com/452032_a5df2d3f782444fc830d43548a304ec5.html#PartA However, I am ...
user avatar
  • 117
3 votes
1 answer
3k views

R: Using st_intersects to classify points inside, outside and within a buffer

I have two objects, a shapefile of location points, points, and a shapefile of polygons, world_buffer (both +proj=utm +datum=WGS84). The world_buffer is the world's coastlines, found here, with a 5 km ...
user avatar
  • 205
0 votes
1 answer
222 views

Classifying points within polygon, outside of polygon OR within buffer at polygon edge using R

I have two objects, a SpatialPointsDataFrame, "points" and a SpatialPolygonsDataFrame, "world_buffer" (both +proj=utm +datum=WGS84). The SpatialPolygonsDataFrame is the world's ...
user avatar
  • 205
0 votes
1 answer
69 views

Does not display Map in Rstudio using Python Package - GEEMAP

I am trying to use the GEEMAP package of Python in RStudio-1.4.1106. After importing the packages and running the code shown below MAP is not displayed rather it displays the MAP attributes in the ...
user avatar
0 votes
1 answer
142 views

Doing exp math in R/Google Earth Engine (rgee)

Is this the correct syntax in R-Studio for rgee (Google Earth Engine) for the following equation? y=0.7*e^(4.1*x) where x is represented by "data" below. y<-data$multiply(4.1)$exp()$...
user avatar
0 votes
1 answer
333 views

Select all images in image collection Google Earth Engine in R Rgee to mosaic

Is there a way to select all images in an image collection in Google Earth Engine or using Rgee? I want to select all the images in an image collection after filtering the collection and then mosaic ...
user avatar
1 vote
1 answer
153 views

Add marker to coordinates Leaflet

i work with RStudio and Leaflet. I like to add inputboxes to type coordinates into them. Then the code should set a marker on this point and zoom on it. How can i do this? I tried to manipulate the ...
user avatar
  • 11
2 votes
0 answers
152 views

How to apply Sen2cor in sen2r graphical user interface?

I have recently installed the sen2r plugin in r for extracting level 1 Sentinel-2 images from ESA's Long Term Archive and using sen2cor correction to obtain level 2 scenes. An issue I face is that the ...
user avatar
  • 548
1 vote
1 answer
267 views

How to remove areas of water from the US census tract map using R/RStudio

I am trying to aggregate all of the census tracts in the United States for analysis and display, including a realistic depiction of water features when zoomed in. I run into memory issues when doing ...
user avatar
  • 51
0 votes
0 answers
27 views

Can't join coordinates to polygons represented by black icons in RStudio viewer

I'm using {sf} to import a GeoJSON file. What does the black icon represent? I'm trying to join coordinates to this object via st_join(ken_con_sf, join = st_within) and it seems to fail where ...
user avatar
1 vote
2 answers
4k views

Exporting shapefile from RStudio

Please can someone show me how to export a file from R in the format of a shapefile in order to be used in GeosegregationAnalyzer (which requires a shapefile). I have merged attribute data with the ...
user avatar