inbo / reporting-rshiny-grofwildjacht

Rshiny app for grofwildjacht
https://grofwildjacht.inbo.be/
MIT License
1 stars 1 forks source link

[BUG] createSpreadData throws an error #466

Closed SanderDevisscher closed 4 months ago

SanderDevisscher commented 5 months ago

Describe the bug When running the code below:

 createSpreadData(tempdir_spread, 
                   spatialData = spatialData)

i get the following error:

Error in `[.data.frame`(x@data, i, j, ..., drop = FALSE) : 
  undefined columns selected

To Reproduce Steps to reproduce the behavior:

  1. move these files to a folder
  2. reference the chosen folder as tempdir_spread <- %path to chosen folder%
  3. run:
    s3load(object = "spatialData.RData",
         bucket = bucket)
  4. run:
    createSpreadData(tempdir_spread, 
                   spatialData = spatialData)
  5. see error

Expected behavior Spreadmodel files are uploaded to UAT bucket without error.

mvarewyck commented 5 months ago

We moved away from sp into sf since https://github.com/inbo/reporting-rshiny-grofwildjacht/issues/287. The correct instructions now are

library(reportingGrofwild)
setupS3()   # or any other way to set credentials
readS3(file = "spatialData_sf.RData")
createSpreadData(tempdir_spread, spatialData = spatialData)
SanderDevisscher commented 4 months ago

fixed