Skip to content

Commit

Permalink
Merge pull request #67 from openpharma/dev
Browse files Browse the repository at this point in the history
safer tbl_r for inframe
  • Loading branch information
erblast authored Sep 28, 2024
2 parents e8415e8 + 51fa7c1 commit 0f433fa
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion R/inframe.R
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,12 @@ sim_inframe <- function(df_visit, r = 1000, df_site = NULL) {
df_r <- tibble(rep = seq(1, r))
} else {
df_r <- r %>%
rename(rep = 1)
# here we make sure that any input dataframe works
# we use as many replications as we have rows
rename(rep = 1) %>%
mutate(
rep = row_number()
)
}

# aggregate per patient to get max visits
Expand Down

0 comments on commit 0f433fa

Please sign in to comment.