On 28/06/10 16:46, GL wrote:
I'm guessing there's a more efficient way to do the following using the index
features of R. Appreciate any thoughts....
for (i in 1:nrow(dbs1)){
if(dbs1$Payor[i] %in% Payor.Group.Medicaid) dbs1$Payor.Group[i] =
"Medicaid"
Try something like
dbs1$Payor.Group[dbs1$Payor %in% Payor.Group.Medicaid]<- "Medicaid"
etc.
to get started.
Hope this helps.
Allan
[...]
______________________________________________
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.