Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Maintenance - Mise à jour mensuelle Lundi 6 Février entre 7h00 et 9h00
Open sidebar
UMR-ASTRE
mapMCDA
Commits
042c0817
Commit
042c0817
authored
Apr 29, 2020
by
Facundo Muñoz
®️
Browse files
read_network(): Simplify expression for checking consistency of coordinates.
parent
a4b061a8
Changes
2
Hide whitespace changes
Inline
Side-by-side
DESCRIPTION
View file @
042c0817
Package: mapMCDA
Title: Produce an epidemiological risk map by weighting multiple risk
factors
Version: 0.4.4
7
Date: 2020-04-2
5
Version: 0.4.4
9
Date: 2020-04-2
9
Authors@R: c( person("Andrea", "Apolloni", email =
"andrea.apolloni@cirad.fr", role = c("ctb"), comment = "Animal
mobility algorithm"), person("Elena", "Arsevska", email =
...
...
R/network.R
View file @
042c0817
...
...
@@ -169,7 +169,7 @@ must be respected:",
v_coord
$
Node
<-
as.factor
(
v_coord
$
Node
)
## Check consistency of coordinates
if
(
any
((
idx
<-
ta
pply
(
v_coord
$
Node
,
v_coord
$
Node
,
length
))
>
1
))
{
if
(
any
((
idx
<-
ta
ble
(
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
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment