I am using the Wisconsin Breast Cancer dataset from UCI Machine Learning repository in r. There are total of 569 observations.
Read the Data.
df <- readxl::read_excel("./wdbc.xlsx")
create bootstrap samples.
k = 20
n = nrow(df)
bootSamples = as.data.frame(matrix(sample(df$ID, size = k*n, replace = TRUE), k, n))
colnames(bootSamples) <- paste0("Column", seq(ncol(bootSamples)))
My doubt is how to create a new data frame in r by using ID value from 1st bootstrap column and extract row corresponding to ID value from original dataframe (1st photo) to new dataframe ?