Re: [R] replacing missing values in a dataframe with reference values.

2008-08-21 Thread Jim Regetz
Gary Collins wrote: Any thoughts on the following I'd be most grateful - I'm sure there is an easy and quick way to do this but I'm having a mental block this evening. Essentially, I'm trying to replace missing data in my dataset with reference values based on age and sex. So an example datas

[R] replacing missing values in a dataframe with reference values.

2008-08-21 Thread Gary Collins
Any thoughts on the following I'd be most grateful - I'm sure there is an easy and quick way to do this but I'm having a mental block this evening. Essentially, I'm trying to replace missing data in my dataset with reference values based on age and sex. So an example dataset is set.seed(1) X =