1

I am looking to use dplyr in order to construct an observation count, much the same way in which SQL would use a partition over function. It must specifically be dplyr due to its speed when handling big data structures

Imagine we have a dataset as follows:

>Letters
A
A
A
B
B
A
B
C
C
D
A
C

And I want to get something as follows:

Letters Count
A   1
A   2
A   3
B   1
B   2
A   4
B   3
C   1
C   2
D   1
A   5
C   3

Any suggestions?

Hanjo Odendaal
  • 1,395
  • 2
  • 13
  • 32

0 Answers0