>> The first column gives the answer that I am looking for but I just >> thought their maybe a better way without using the long variable > > Sounds like you want the frequency-weighted summary statistics. > For the mean, look at ?weighted.mean. > For more comprehensive stats, check ?wtd.mean in the Hmisc pkg. > A search with pkg sos may provide more options. > > Peter Ehlers >>
that the one. Thank you very much Peter and thanks for all the replies and info. Much appreciated Dan ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.