[ ] If a call to a function is present using ::, you get the following warning.
Error in `rlang::as_string()`:
! Can't convert a call to a string.
Workaround: Define the required function in the global environment before using it, like colMins <- matrixStats::colMins before declaring the custom constraint.
[ ] Sub-redist_maps after filtering fail if you rely on the district number and the numbers are not sequential. On an example Iowa map, filter out district 2 and then try to subset to access district 2, causing a NaN issue.
Workaround: renumber the existing_col when you create the map
[ ] If a call to a function is present using
::
, you get the following warning.Workaround: Define the required function in the global environment before using it, like
colMins <- matrixStats::colMins
before declaring the custom constraint.[ ] Sub-
redist_map
s after filtering fail if you rely on the district number and the numbers are not sequential. On an example Iowa map, filter out district 2 and then try to subset to access district2
, causing a NaN issue. Workaround: renumber theexisting_col
when you create the map