Re: [R] Weighting column entries in a data frame

2009-06-24 Thread camillus
Thanks! jholtman wrote: > > Try this: > >> fdata > state statenum yearincome popul > 1 ALABAMA11 9.703193 3973 > 2 ALABAMA12 9.745950 3992 > 3 ALABAMA13 9.762092 4015 > 4 ALASKA21 10.221640 532 > 5 ALASKA22 10.16960

Re: [R] Weighting column entries in a data frame

2009-06-23 Thread jim holtman
Try this: > fdata state statenum yearincome popul 1 ALABAMA11 9.703193 3973 2 ALABAMA12 9.745950 3992 3 ALABAMA13 9.762092 4015 4 ALASKA21 10.221640 532 5 ALASKA22 10.169600 544 6 ALASKA23 10.101300 539

[R] Weighting column entries in a data frame

2009-06-23 Thread camillus
Hi Guys, I would like to weight column entries in a data frame by the population of each state. For example, here is some data: state statenum year incomepopul ALABAMA11 9.703193 3973.00 ALABAMA12 9.745950 3992.00 ALABAMA13 9.76209