Log in Sign up
1 Matching Annotations
  1. May 2022
  2. stackoverflow.com stackoverflow.com
    Numbering rows within groups in a data frame
    1
    1. pbk1 13 May 2022
      in Public
      df %>% group_by(cat) %>% mutate(id = row_number())

      numbering index within a group

      dplyr index by_group replicate count number
    Visit annotations in context

    Tags

    • index
    • count
    • dplyr
    • number
    • replicate
    • by_group

    Annotators

    • pbk1

    URL

    stackoverflow.com/questions/12925063/numbering-rows-within-groups-in-a-data-frame
Share:
Group. Only group members will be able to view this annotation.
Only me. No one else will be able to view this annotation.
Hypothes.is
  • About
  • Blog
  • Bioscience
  • Education
  • Jobs
  • Help
  • Contact
  • Terms of Service
  • Privacy Policy