Skip to content

Commit

Permalink
Merge pull request #24 from UCD-SERG/scrub-vignette
Browse files Browse the repository at this point in the history
add n, fixed antigen_isos bug
  • Loading branch information
kaiemjoy authored Nov 9, 2023
2 parents 513c231 + 3313afd commit b71947f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions R/est.incidence.by.R
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ est.incidence.by <- function(
fun = function(x)
.optNll(
dataList = x,
antigen_isos = antigen_isos,
...)
)
} |> system.time() -> time
Expand Down Expand Up @@ -122,6 +123,7 @@ est.incidence.by <- function(
fits[[cur_stratum]] =
.optNll(
dataList = stratumDataList[[cur_stratum]],
antigen_isos = antigen_isos,
verbose = verbose,
...)

Expand Down
3 changes: 2 additions & 1 deletion R/get_strata.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ get_strata = function(data, strata_varnames)
{
to_return =
data |>
distinct(across(any_of(strata_varnames))) |>
count(across(any_of(c(strata_varnames, "antigen_iso")))) |>
distinct(across(any_of(c(strata_varnames, "n")))) |>
mutate(Stratum = paste("Stratum", row_number()))

}

0 comments on commit b71947f

Please sign in to comment.