R-ArcGIS / arcgislayers

Access ArcGIS Data and Location Services
http://r.esri.com/arcgislayers/
Apache License 2.0
47 stars 10 forks source link

page_size check results in error #205

Closed JosiahParry closed 4 months ago

JosiahParry commented 4 months ago

Repro based on :https://github.com/R-ArcGIS/arcpbf/issues/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
  )