Skip to content

Commit c54d53f

Browse files
committed
add checks to examples
1 parent bd824d0 commit c54d53f

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

man/ACLEDpopGDP.Rd

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,22 @@ ACLEDpopGDP['CPV'==ACLEDpopGDP[, 'ISO3'], ]
141141
# NOTE: In this example, ACLEDcountry !=
142142
# WBcountry.
143143

144+
# No NAs in pop
145+
\dontshow{stopifnot(}
146+
all.equal(length(which(is.na(ACLEDpopGDP$pop))), 0)
147+
\dontshow{)}
148+
149+
# Only one NA in GDPpcn and GDPpcp:
150+
(GDPpNA <- which(is.na(ACLEDpopGDP$GDPpcp)))
151+
(GDPnNA <- which(is.na(ACLEDpopGDP$GDPpcn)))
152+
# Antarctica:
153+
\dontshow{stopifnot(}
154+
all.equal(ACLEDpopGDP$ACLEDcountry[GDPpNA], 'Antarctica')
155+
\dontshow{)}
156+
\dontshow{stopifnot(
157+
all.equal(ACLEDpopGDP$ACLEDcountry[GDPnNA], 'Antarctica')
158+
)}
159+
144160
# Normal probability plots of population
145161
qqnorm(unlist(Pops), datax=TRUE)
146162
qqnorm(unlist(Pops), datax=TRUE, log='x')

0 commit comments

Comments
 (0)