Re: [R] how to match a dataframe and a list

2011-08-25 Thread R. Michael Weylandt
I'd be willing to guess that some combination of match() %in% unlist() will get the job done, but without knowing what sort of data you have, I can't write example code. If you could, use the dput() function to turn your data into plain text and let us work directly with it to help you out. If i

[R] how to match a dataframe and a list

2011-08-25 Thread Serena105
Hi! I am a beginner and I hope you will help me! I have one data frame with numbers as columns names that correspond to codes. In a list I have the codes and the corresponding state. Now I need to match the columns (codes) of the data.frame with the codes in the list, since not all the codes in