data %>% select(gid,id, type, idtype, sourcenode, ctime, car) %>% distinct() -> final
final %>% group_by(gid) %>% mutate(count = n()) %>% distinct() -> final
final %>% left_join(car, by ="car") -> final
The above lines are from a R script. I am not able to understand what these lines actually means.
I have tried to follow a lot of resources, but I am still not sure about these lines.
Can someone help me understand all these 3 lines ?