I have a given dataset and want to create a bootstrap (with resampling) of 10 replicates of the dataframe and have new ids assigned to them in the final dataset. Please guide me on this.
Random.seed!(123)
df = DataFrame(
id = ["1","1","1","2","2","2","3","3","3"],
time = [0,0.5,2,0,0.5,2,0,0.5,2],
cmt = [1,0,0,1,0,0,1,0,0],
value = [0.01,0.02,0.03,0.02,0.03,0.05,0.01,0.05,0.10]
)
Thanks a lot.
I am not fully sure that this is what you want:
It creates is a data frame, where for each unique
replicatevalue you have a separate bootstrap sample of your originaldfdata frame.