Thanks to @G. Grothendieck the function nextfri
in the zoo package vignette did the trick!
# given a Date, x, return the Date of the next Friday
nextfri <- function(x) 7 * ceiling(as.numeric(x - 1)/7) + as.Date(1)
pr2 <- lapply(pr, function(x) x <- do.call(rbind, lapply(split(x, "weeks"), last))
index(x) <- nextfri(index(x))
x
)
pr3 <- do.call(merge, pr2)