This question has two parts, please read through it. Thanks.
I have a data.frame that looks like this:
I want to know whether there is simple way to r