mirror of
https://github.com/msberends/AMR.git
synced 2025-07-10 05:41:59 +02:00
new tibble export
This commit is contained in:
@ -180,15 +180,15 @@ atc_online_property <- function(atc_code,
|
||||
|
||||
if (property %in% c("atc", "name")) {
|
||||
# ATC and name are only in first row
|
||||
returnvalue[i] <- out[1, property]
|
||||
returnvalue[i] <- out[1, property, drop = TRUE]
|
||||
} else {
|
||||
if (!"adm.r" %in% colnames(out) | is.na(out[1, "adm.r"])) {
|
||||
if (!"adm.r" %in% colnames(out) | is.na(out[1, "adm.r", drop = TRUE])) {
|
||||
returnvalue[i] <- NA
|
||||
next
|
||||
} else {
|
||||
for (j in seq_len(nrow(out))) {
|
||||
if (out[j, "adm.r"] == administration) {
|
||||
returnvalue[i] <- out[j, property]
|
||||
returnvalue[i] <- out[j, property, drop = TRUE]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user