R-ArcGIS/arcgislayers

page_size check results in error

Closed this issue · 0 comments

Repro based on :R-ArcGIS/arcpbf#2

library(arcgislayers)

PRCP_pred <- "https://services.arcgis.com/GL0fWlNkwysZaKeV/arcgis/rest/services/TXLA_ZCTA_PRCPpred/FeatureServer/0" |> 
    arc_open() -> x

res <- x |> 
    arc_select(n_max = 500, page_size = 10)

We need to 1 fix this and 2 add tests.

There is some wonkiness with the rlang standalone checks that break the check

here is the workaround code

  check_number_whole(as.integer(page_size), min = 1, allow_null = TRUE)
  check_number_whole(
    as.integer(page_size),
    max = as.double(x$maxRecordCount),
    allow_null = TRUE
  )