Commit 042c0817 by Facundo Muñoz ®️

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

parent a4b061a8
 Package: mapMCDA Package: mapMCDA Title: Produce an epidemiological risk map by weighting multiple risk Title: Produce an epidemiological risk map by weighting multiple risk factors factors Version: 0.4.47 Version: 0.4.49 Date: 2020-04-25 Date: 2020-04-29 Authors@R: c( person("Andrea", "Apolloni", email = Authors@R: c( person("Andrea", "Apolloni", email = "andrea.apolloni@cirad.fr", role = c("ctb"), comment = "Animal "andrea.apolloni@cirad.fr", role = c("ctb"), comment = "Animal mobility algorithm"), person("Elena", "Arsevska", email = mobility algorithm"), person("Elena", "Arsevska", email = ... ...
 ... @@ -169,7 +169,7 @@ must be respected:", ... @@ -169,7 +169,7 @@ must be respected:", v_coord\$Node <- as.factor(v_coord\$Node) v_coord\$Node <- as.factor(v_coord\$Node) ## Check consistency of coordinates ## 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 = ", ") idx.nodes <- paste(names(idx)[idx > 1], collapse = ", ") stop("Inconsistent coordinates.\n", stop("Inconsistent coordinates.\n", "The file specifies different coordinates in different lines for node(s): ", idx.nodes) "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!