Skip to main content

Questions tagged [dplyr]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2 votes
2 answers
51 views

Filtering hexagons using sf

I stumbled across this answer because I want to create a fine hexagon grid. The answer works; however, R freezes when I try to filter a large amount of hexagons (smaller ones) using the provided code ...
Daniel AG's user avatar
0 votes
1 answer
52 views

Counting number of points per feature unique Id in lidR

I am working with a LAScatalog comprising over 10 LAS files and have generated a fishnet grid with 1m x 1m cells upto the extent of my ROI. Each cell in the ROI grid is uniquely identified by an 'Id' ...
Sonali Sharma's user avatar
1 vote
1 answer
1k views

How to set a geometry to NA (empty) for some features of an sf dataframe in R

I would like to set to empty the geometries of some features of my sf object given a condition. Here is my code: my_points %<>% mutate(geometry = if_else(district_x != district_y, st_sfc(rep(...
Faustin Gashakamba's user avatar
1 vote
0 answers
198 views

Filtering st_intersect to only consider rows in the data which are the same country in R

I have got a data frame / tibble, which contains the Lat/Long and Country for each data point. Currently, st_intersect is being used to output the row numbers for each row which intersect within the ...
Alex's user avatar
  • 21
1 vote
1 answer
66 views

How to find the row number based on a set of SFC coordinates, in order to pull out the value from another column

I am new to geodetic data in R, so apologies if this is way off. I have got a dataset, with a column geometry, which contains SFC points, and a second column IntersectingPoints: IntersectingPoints ...
Alex's user avatar
  • 21
0 votes
0 answers
354 views

Apply function at grid cell level across layers of a raster file

I have a netcdf raster object with multiple layers (time: 30 years * 12 month = 360 steps). The raster is constituted of multiple grid-cells (say 1000). I want to linearly detrend each month ...
Raed Hamed's user avatar
0 votes
0 answers
1k views

R pivot_wider: Error in Ops.sfc(xi, xj) : operation > not supported

I've rerun some data and am now getting this cryptic error message when trying to transfer my sf object from long to wide table format. Error in Ops.sfc(xi, xj) : operation > not supported Does ...
Joanne Demmler's user avatar
1 vote
1 answer
1k views

Buffer points within sf data frame of mixed geometry types

I have a directory of shape-files with identical data scheme, which I like to read and combine into one layer. Reading in: library(sf) library(dplyr) # create list of file names from directory names....
Bernd V.'s user avatar
  • 3,199