Replies: 1 comment
-
You could just resample rows from your source data set new_data <- slice_sample(data_pkpd, n = nsim, replace = TRUE) %>% mutate(ID = row_number()) I think the code using new_data <- pivot_longer(data_pkpd, cols = c(CL:BL_PD)) %>% group_by(name) %>% slice_sample(n = nsim) %>% ungroup() ... |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I am typically create my dataset using the following code, where I sample individual PK estimates from the pkpd dataset (data_pkpd):
However, mutate_random is a part of dmutate package and I am unable to use it for the current analysis.
Is there any alternative approach to create individual dataset using the mrgsovle package ?
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions