How to split data in R using dplyr if we want to have rows of the same group to belong to the same split?
Figured out an easy way to do this.

First we will just select PID from the real data.
Then we will just sample 0.75 % of these PID and save these point as training PID and the rest as testing PID.
We will thne find the intersection between this list and the real data using PID.