## creating simulation data
control_mutant <- list(rate = 0.03, rep = 25, treat = "control", genotype = "mutant")
treat_mutant <- list(rate = 0.03 * 0.55, rep = 125, treat = "treat", genotype = "mutant")
control_wild <- list(rate = 0.03 * 0.2, rep = 125, treat = "control", genotype = "wild")
treat_wild <- list(rate = 0.03 * 0.55 * 0.2, rep = 25, treat = "treat", genotype = "wild")
lst <- list(control_mutant, treat_mutant, control_wild, treat_wild)
# set seed
set.seed(4321)
# make simulated df
simulated_df <- map(lst, ~ tibble(time = rexp(.$rep, rate = .$rate),
status = 1, # there is no censoring
treat = .$treat,
genotype = .$genotype)) %>% # making list of tibble
bind_rows() # combine to one table
## plot K-M curve
ggsurvplot(surv_fit(Surv(time, status) ~ treat, data = simulated_df))
It looks like No.73 issue, but I cannot solve this error.
Can you advise me for this error?
Hi, I'm using a follow script
and it's fail with
sort.list(y) でエラー: 'x' must be atomic for 'sort.list'
Have you called 'sort' on a list?
It looks like No.73 issue, but I cannot solve this error.
Can you advise me for this error?