You might try:
a %>%
group_by(ID) %>%
arrange(NUM) %>%
slice(n())
More Related Contents:
- R spreading multiple columns with tidyr [duplicate]
- dplyr: nonstandard column names (white space, punctuation, starts with numbers)
- dplyr filter with condition on multiple columns
- How to add a cumulative column to an R dataframe using dplyr?
- R – add column that counts sequentially within groups but repeats for duplicates
- Change value of variable with dplyr
- dplyr – filter by group size
- Merge rows in a dataframe where the rows are disjoint and contain NAs
- Calculate group mean while excluding current observation using dplyr
- mutate_each / summarise_each in dplyr: how do I select certain columns and give new names to mutated columns?
- finding close match from data frame 1 in data fame 2
- dplyr change many data types
- Join two data frames in R based on closest timestamp
- How to dplyr rename a column, by column index?
- How to add only missing Dates in Dataframe
- Override column types when importing data using readr::read_csv() when there are many columns
- Adding column if it does not exist
- Reshape three column data frame to matrix (“long” to “wide” format) [duplicate]
- Convert a list to a data frame
- Conditional replacement of values in a data.frame
- How do I combine two data-frames based on two columns? [duplicate]
- Use variable names in functions of dplyr
- Finding percentage in a sub-group using group_by and summarise
- How to initialize empty data frame (lot of columns at the same time) in R
- Read and rbind multiple csv files
- R – Group by variable and then assign a unique ID [duplicate]
- Count number of zeros per row, and remove rows with more than n zeros
- How I can select rows from a dataframe that do not match?
- R sum a variable by two groups [duplicate]
- data.table row-wise sum, mean, min, max like dplyr?