If you want to use base functions, here's one possibility
as.vector(by(ages[c("Age","W")],
list(ages$Indiv),
function(x) {
do.call(weighted.mean, unname(x))
}
))
Since aggregate won't subset multiple columns, i user the more general by
and simplified the result to a vector.