R elegant way to balance unbalanced panel data
问题 Is there an elegant way to balance an unbalanced panel data set? I would like to start with an unbalanced panel (ie, some individuals are missing some data) and end up with a balanced panel (ie, all individuals are missing no data). Below is some sample code. The correct end result is for all observations on 'Frank' and 'Edward' to remain and for all observations on 'Tony' to be removed since he has some missing data. Thank you. unbal <- data.frame(PERSON=c(rep('Frank',5),rep('Tony',5),rep(