Skip to content

Commit ceacf6a

Browse files
authored
Merge pull request #302 from USEPA/189-tcplsubsetchid-overwrites-hitc-to-boolean
update mc overwrite of hitc to bool in tcplSubsetChid to actc
2 parents b5868f9 + 7ccfede commit ceacf6a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: R/tcplSubsetChid.R

+3-3
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,9 @@ tcplSubsetChid <- function(dat, flag = TRUE, type = "mc", export_ready = FALSE)
9292
}
9393
if (!"casn" %in% names(dat)) dat <- tcplPrepOtpt(dat)
9494
# for now we treat all >=.9 hitcall equally
95-
dat[, hitc := hitc >= .9]
96-
dat[, chit := mean(hitc[hitc %in% 0:1]) >= 0.5, by = list(aeid, chid)]
97-
dat <- dat[hitc == chit | (is.na(chit) & (hitc == -1 | is.na(m4id)))]
95+
dat[, actc := hitc >= .9]
96+
dat[, chit := mean(actc[actc %in% 0:1]) >= 0.5, by = list(aeid, chid)]
97+
dat <- dat[actc == chit | (is.na(chit) & (actc == -1 | is.na(m4id)))]
9898

9999

100100
dat[, fitc.ordr := NA_integer_]

0 commit comments

Comments
 (0)