diff obisindicators.r @ 1:d7b6ff32d072 draft

planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/obisindicators commit d1d3e8640457c30349b842ea05de64b9312890f4
author ecology
date Wed, 25 Jan 2023 16:01:52 +0000
parents 1015a0070bac
children
line wrap: on
line diff
--- a/obisindicators.r	Thu Dec 29 13:05:04 2022 +0000
+++ b/obisindicators.r	Wed Jan 25 16:01:52 2023 +0000
@@ -32,9 +32,10 @@
     spe <- as.numeric(args[6])
     rec <- as.numeric(args[7])
     crs <- as.numeric(args[8])
-    source(args[9])
+    reso <- as.numeric(args[9])
     source(args[10])
     source(args[11])
+    source(args[12])
 }
 
 if (hr == "false") {
@@ -63,7 +64,7 @@
 #Create a discrete global grid
 #Create an ISEA discrete global grid of resolution 9 using the dggridR package:
 
-dggs <- dggridR::dgconstruct(projection = "ISEA", topology = "HEXAGON", res = 9)
+dggs <- dggridR::dgconstruct(projection = "ISEA", topology = "HEXAGON", res = reso)
 
 #Then assign cell numbers to the occurrence data
 occ$cell <- dggridR::dgGEO_to_SEQNUM(dggs, occ$decimalLongitude, occ$decimalLatitude)[["seqnum"]]