Hey everyone, I have a problem with the a dataset like the following table. id year modal 111 111 111 112 112 113 113 113 2006 2006 2006 2006 2006 2006 2006 2006 1 2 123 13 12 12 2 2 112 112 112 112 112 113 113 113 114 114 115 115 2007 2007 2007 2007 2007 2007 2007 2007 2007 2007 2007 2007 2 2 123 23 23 23 3 3 3 1 1 1 114 114 115 115 116 116 116 116 2008 2008 2008 2008 2008 2008 2008 2008 12 1 13 1 2 2 2 3 114 114 114 114 2009 2009 2009 2009 3 123 1 2 I want to find out which modal exists for each id and year. The following combinations are possible: 1; 2; 3; 12; 13; 23 and 123. What the output should look like: id year Modal_total 111 112 113 112 113 114 115 114 115 116 114 2006 2006 2006 2007 2007 2007 2007 2008 2008 2008 2009 123 123 12 123 23 13 1 12 13 23 123 Thanks a lot in advance. 🙂
... View more