This is old-fashioned and a bit ugly but I think it works. Note I have changed the variable names.
library(ggplot2)
dat1 <- structure(list(id = c("BD0035017", "BD0035016", "BD0035020",
"BD0035019", "BDO035021", "BD0035024", "BDO035025", "BD0035023",
"BDO035031", "BD0035035", "BD0035030", "BD0035033", "BD0035041",
"BD0035034", "BD0035036", "BD0035039", "BD0035037"), vial = c(9L,
9L, 9L, 7L, 8L, 9L, 8L, 8L, 8L, 8L, 6L, 9L, 8L, 10L, 10L, 8L,
7L)), row.names = c(NA, 17L), class = "data.frame")
dat1$vial <- as.character(dat1$vial)
tt1 <- table(dat1$vial)
tt2 <- as.data.frame(tt1)
tt2$pc <- tt2$Freq/sum(tt2$Freq) * 100
ggplot(tt2, aes(Var1, pc)) + geom_bar(stat = "identity", aes(fill = "red"), show.legend = FALSE) +
xlab("Vial ID") + ylab("Percentage")