mirror of
https://github.com/msberends/AMR.git
synced 2025-07-08 15:21:58 +02:00
(v1.7.1.9071) rsi disk fix
This commit is contained in:
Binary file not shown.
@ -111,6 +111,23 @@ rsi_translation <- rsi_generic %>%
|
||||
distinct(guideline, ab, mo, method, site, .keep_all = TRUE) %>%
|
||||
as.data.frame(stringsAsFactors = FALSE)
|
||||
|
||||
# disks MUST be 6-50 mm, so correct where that is wrong:
|
||||
rsi_translation[which(rsi_translation$method == "DISK" &
|
||||
(is.na(rsi_translation$breakpoint_S) | rsi_translation$breakpoint_S > 50)), "breakpoint_S"] <- 50
|
||||
rsi_translation[which(rsi_translation$method == "DISK" &
|
||||
(is.na(rsi_translation$breakpoint_R) | rsi_translation$breakpoint_R < 6)), "breakpoint_R"] <- 6
|
||||
m <- unique(as.double(as.mic(levels(as.mic(1)))))
|
||||
rsi_translation[which(rsi_translation$method == "MIC" &
|
||||
is.na(rsi_translation$breakpoint_S)), "breakpoint_S"] <- min(m)
|
||||
rsi_translation[which(rsi_translation$method == "MIC" &
|
||||
is.na(rsi_translation$breakpoint_R)), "breakpoint_R"] <- max(m)
|
||||
|
||||
# WHONET has no >1024 but instead uses 1025, 513, etc, so raise these one higher valid MIC factor level:
|
||||
rsi_translation[which(rsi_translation$breakpoint_R == 129), "breakpoint_R"] <- m[which(m == 128) + 1]
|
||||
rsi_translation[which(rsi_translation$breakpoint_R == 257), "breakpoint_R"] <- m[which(m == 256) + 1]
|
||||
rsi_translation[which(rsi_translation$breakpoint_R == 513), "breakpoint_R"] <- m[which(m == 512) + 1]
|
||||
rsi_translation[which(rsi_translation$breakpoint_R == 1025), "breakpoint_R"] <- m[which(m == 1024) + 1]
|
||||
|
||||
# save to package
|
||||
usethis::use_data(rsi_translation, overwrite = TRUE)
|
||||
rm(rsi_translation)
|
||||
|
@ -1 +1 @@
|
||||
14cdc0922a0dc5ec6bcacd5938fdeb93
|
||||
2d5adb3d28ff14e0ce09b391b4a55768
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user