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

read_network(): Simplify expression for checking consistency of coordinates.

parent a4b061a8
Package: mapMCDA
Title: Produce an epidemiological risk map by weighting multiple risk
factors
Version: 0.4.47
Date: 2020-04-25
Version: 0.4.49
Date: 2020-04-29
Authors@R: c( person("Andrea", "Apolloni", email =
"andrea.apolloni@cirad.fr", role = c("ctb"), comment = "Animal
mobility algorithm"), person("Elena", "Arsevska", email =
......
......@@ -169,7 +169,7 @@ must be respected:",
v_coord$Node <- as.factor(v_coord$Node)
## Check consistency of coordinates
if (any((idx <- tapply(v_coord$Node, v_coord$Node, length)) > 1)) {
if (any((idx <- table(v_coord$Node)) > 1)) {
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)
......
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