Hi all, I have two datasets:
Dataset 1 - List of Users, the layout looks like this: ID Name C1 C2 C3 ............C23 C24 C25 Dataset 2 - List of Codes, the layout looks like this: Code Description Category The code fields in the user-dataset do not have to contain a value and if they have a value they dont have to correspond with the Codes-dataset. Now I need 2 things: - Per user-record the number of occurences in the Codes table, so if one user would have C1, C8, C12, C19 occuring in the Codes dataset that would be 4. - The top 20 of the most occuring codes with their description I find this very challenging but I'm sure there are some R-guru's out there who can help me on this:) I cannot give any sample data because it's classified Thanks in advance -- View this message in context: http://r.789695.n4.nabble.com/Retreiving-correct-data-from-combining-two-datasets-tp4673131.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ 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.