cropField() in newest version of RStudio

36 views
Skip to first unread message

Emma Grace Matcham

unread,
Feb 3, 2022, 11:41:53 AM2/3/22
to cleanRfield: A tool for cleaning and filtering spatial data points
Hi cleanRfield users-- the newest version of RStudio 2021.09.2 has changed some aspects of the plot viewing pane. This causes the points you click to define the corners of your cropping polygon to not be placed where you click, sometimes not even over the field at all, and can result in this error message:

Error in RGEOSBinTopoFunc(spgeom1, spgeom2, byid, id, drop_lower_td, unaryUnion_if_byid_false,  :
  trying to get slot "proj4string" from an object of a basic class ("NULL") with no slots

Screenshot 2022-02-03 103909.jpg

If you are experiencing issues with cropField(), we recommend opening the plot in a pop-up window instead of the integrated viewing pane. Example code:

#Open an extra plot window
x11()
# "Use cursor to select 4 points around of polygon (1) in the plots window."
EX1.C<-cropField(field = EX1, nPolygon = 1, nPoint = 4)

The Github tutorial has been updated to include this code, too, as of 3 Feb 2022. 

Let us know if you run into additional plotting issues, especially with RStudio 2021.09.2

-EGM
Reply all
Reply to author
Forward
0 new messages