Questions tagged [dplyr]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
592 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
160 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
41 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
236 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
995 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
970 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,221