Re: [R] question on more efficient data block-match processing

2014-03-07 Thread Rainer Schuermann
What I would do: # read in your sample data mbr - read.table( clipboard, header = TRUE, stringsAsFactors = FALSE ) # create a vector with the codes you want to consider code.list - c(A,B,C,D,E) # reduce the data accordingly mbr - mbr[ mbr$code %in% code.list, ] # get your model matrix using

[R] question on more efficient data block-match processing

2014-03-06 Thread Mckinstry, Craig
I have a medical insurance claims datafile divided into blocks by member, with multiple lines per member. I am process these into a one line per member model matrix. Member block sizes vary from 1 to 50+. I am match attributes in claims data to columns in the model matrix and have been