Displaying 1 result from an estimated 1 matches for "codepayor".
2010 Jun 28
6
Basic question - more efficient method than loop?
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"
if(dbs1$Payor[i] %in% Payor.Group.Medicare) dbs1$Payor.Group[i] =
"Medicare"
if(dbs1$Payor[i] %in% Payor.Group.Commercial)