I'm using the below code to bootstrap a confidence interval for a median, which works just fine.
library(boot)
data <- c(6, 11, 7, 8, 3, 9, 4, 1, 1, 8, 2, 2, 5, 3, 1)
weight <- c(0.839432605459112, 0.774215027235327, 0.709256693551626, 0.809376516981207, 0.809698716683444, 0.880849581474519, 0.829263837448813, 1.80390621483409, 1.12749447791778, 0.93389158146594, 1.07832286911631, 0.79541512406283, 1.06708509325217, 0.946752658104578, 0.968003233015867)
Mboot = boot(data, function(x,i) median(x[i]), R=10000)
boot.ci(Mboot, conf = 0.95, type = c("norm", "basic" ,"perc"))
However, I would like to calculate the bootstrapped weighed median for this and only found how I can either calculate the weighed median or bootstrap it.