I m new in R.
I want to transform the column value to number of rows.
Eg
data1
Month | Number |
---|---|
March | 1 |
April | 2 |
April | 2 |
The output i want
Month | Number |
---|---|
March | 1 |
April | 1 |
April | 1 |
April | 1 |
April | 1 |
I tree this script but he give me this
data1 %>%
ungroup %>%
uncount(Number)
Error in uncount()
:
! weights
can’t be missing. Location … is missing.
New contributor
Axl Rose is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.