Commit c67d5ba6 authored by Facundo Muñoz's avatar Facundo Muñoz ®️
Browse files

Improve error message: inconsistent coordinates

parent 053f94f2
Package: mapMCDA
Title: Produce an epidemiological risk map by weighting multiple risk
factors
Version: 0.4.4
Version: 0.4.5
Date: 2019-04-11
Authors@R: c( person("Andrea", "Apolloni", email =
"andrea.apolloni@cirad.fr", role = c("ctb"), comment = "Animal
......
......@@ -146,8 +146,9 @@ must be respected:",
## Check consistency of coordinates
if (any((idx <- tapply(v_coord$Node, v_coord$Node, length)) > 1)) {
idx.nodes <- names(idx)[idx > 1]
stop("Node(s) ", idx.nodes, " have inconsistent coordinates in the dataset.")
idx.nodes <- paste(names(idx)[idx > 1], collapse = ", ")
stop("Inconsistent coordinates.\n",
"The file specifies different coordinates in different lines for node(s): ", idx.nodes)
}
ans <- geonetwork::geonetwork(e_list, v_coord, directed = TRUE)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment