Hi ,

I've been struggling with this problem. Initially I thought something like
a na.locf would help but I'm at a dead end. I have a data set like this:

 ID  Prod1  Prod2  Prod3  Prod4  Prod5
01    A             -           B        -           C
02      -           F           -           G        -
03      H         -             -           -         J


And I would like to remove all the blanks and get a aggregated list against
each ID like so:

01 A B C
02 F G
03 H J

Can anyone suggest a function or a package on how to achieve this ?

Thank you ,

Ankur

        [[alternative HTML version deleted]]

______________________________________________
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.

Reply via email to