Skip to content

Commit

Permalink
more lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
erblast committed Feb 22, 2024
1 parent 2125c31 commit aa19c67
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion R/simaerep.R
Original file line number Diff line number Diff line change
Expand Up @@ -975,7 +975,7 @@ sim_after_prep <- function(df_sim_prep,
get_pat_pool_config <- function(df_visit, df_site, min_n_pat_with_med75 = 1) {

# site_config are the number of sites with their individual visit_med75 and n_pat_with_med75
df_site_config <- select(df_site,c(
df_site_config <- select(df_site, c(
"study_id",
"site_number",
"visit_med75",
Expand Down
6 changes: 3 additions & 3 deletions R/simulate_test_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ sim_test_data_study <- function(n_pat = 1000,
if (! any(c(is.null(ae_rates), is.na(ae_rates)))) {

if (is_ur) {
ae_rates <- ae_rates * (1-ur_rate)
ae_rates <- ae_rates * (1-ur_rate) # nolint

Check warning on line 51 in R/simulate_test_data.R

View check run for this annotation

Codecov / codecov/patch

R/simulate_test_data.R#L50-L51

Added lines #L50 - L51 were not covered by tests
}

f_sample_ae <- function(max_visit) {

Check warning on line 54 in R/simulate_test_data.R

View check run for this annotation

Codecov / codecov/patch

R/simulate_test_data.R#L54

Added line #L54 was not covered by tests

# extrapolate missing ae rates by extending last rate
fill <- rep(ae_rates[length(ae_rates)], max_visit)
fill[1: length(ae_rates)] <- ae_rates
fill[seq_along(ae_rates)] <- ae_rates
ae_rates <- fill

Check warning on line 59 in R/simulate_test_data.R

View check run for this annotation

Codecov / codecov/patch

R/simulate_test_data.R#L57-L59

Added lines #L57 - L59 were not covered by tests

aes <- integer(0)

Check warning on line 61 in R/simulate_test_data.R

View check run for this annotation

Codecov / codecov/patch

R/simulate_test_data.R#L61

Added line #L61 was not covered by tests
Expand Down Expand Up @@ -606,7 +606,7 @@ sim_test_data_portfolio <- function(df_config, df_ae_rates = NULL, parallel = FA

df_portf <- df_config_sim %>%
unnest("sim") %>%
select(- c("n_pat" ,"ae_rates")) %>%
select(- c("n_pat", "ae_rates")) %>%
group_by(.data$study_id) %>%
mutate(
# patnums need to be made site exclusive
Expand Down

0 comments on commit aa19c67

Please sign in to comment.