openkfw / mapme.protectedareas

Reproducible workflows in R for processing open geodata to create knowledge about KfW supported protected areas and conservation effectiveness.
GNU General Public License v3.0
3 stars 0 forks source link

Typo in code/processing-scripts/01_grid_creation.R #106

Closed fBedecarrats closed 2 years ago

fBedecarrats commented 2 years ago

Bongiorno tutti, A closing parenthesis appears to be missing in code/processing-scripts/01_grid_creation.R, on line 40. The closing parenthesis on line 42 should be removed. Instead of:

  st_write(hexa,
           paste(
             "../../datalake/mapme.protectedareas/processing/fishnet/honeycomb_",
             i,
             "_sqkm.gpkg",
             sep = "",
             append= FALSE # overwrite layer if exists. Use with caution
           )
  )

The code should be:

  st_write(hexa,
           paste(
             "../../datalake/mapme.protectedareas/processing/fishnet/honeycomb_",
             i,
             "_sqkm.gpkg",
             sep = ""), # add closing parenthesis here
             append= FALSE # overwrite layer if exists. Use with caution
        # ) remove closing parenthesis here
  )

Otherwise "FALSE" gets pasted inside the file name and the argument append = FALSE is not passed to the st_write function. Arriverderci, FB

Jo-Schie commented 2 years ago

thanks for pointing that out @fBedecarrats . I just fixed it.