Tag: distinct return last row of data in R

  • Get the first and last row of the data group in R

    Get the first and last row of the data group in R

    If your data frame content is categorized and you are interested to extract the first and the last row of each group in R, this post is for you. It is a useful solution to detect the minimum and the maximum by a group in big data sets. In my experience, it works faster than…