Create a histogram for weighted values
library(ggplot2)
w <- seq(1,1000)
v <- sort(runif(1000))
foo <- data.frame(v, w)
ggplot(foo, aes(v, weight = w)) + geom_histogram()
Package plotrix
has a function weighted.hist
which does what you want:
w<-seq(1,1000)
v<-sort(runif(1000))
weighted.hist(v, w)