diff --git a/scripts/clustering.R b/scripts/clustering.R index 40d1573..bef949c 100644 --- a/scripts/clustering.R +++ b/scripts/clustering.R @@ -1,5 +1,5 @@ # case study using mclust package -tool_exec <- function(in_params, out_prams) +tool_exec <- function(in_params, out_params) { if (!requireNamespace("sp", quietly = TRUE)) install.packages("sp") @@ -10,10 +10,10 @@ tool_exec <- function(in_params, out_prams) source_dataset = in_params[[1]] #nclust = in_params[[2]] - out_table = out_prams[[1]] - out_ellipses = out_prams[[2]] - out_dens = out_prams[[3]] - out_sim = out_prams[[4]] + out_table = out_params[[1]] + out_ellipses = out_params[[2]] + out_dens = out_params[[3]] + out_sim = out_params[[4]] ### read data arc.progress_label("Loading Dataset") d <- arc.open(source_dataset) @@ -106,7 +106,7 @@ tool_exec <- function(in_params, out_prams) arc.write(out_sim, data=list(id=1:length(sim.xy$x)), sim.xy, list(type='Point', WKT=arc.shapeinfo(data_shp)$WKT)) } arc.progress_label("Done") - return(out_prams) + return(out_params) } simulation <- function(bestModel, n) @@ -158,4 +158,4 @@ foo <- function() list("d:\\Data\\R-staff\\samps\\data.gdb\\spruce_trees", NULL), list(NULL, NULL, NULL, "in_memory\\sim") ) -} \ No newline at end of file +}