Example
Value
15
15
15
4
37
37
37
There's three distinct values but 7 rows, below is what I want. Since I want to Anonymize my data. I keep getting the error "replacement has 3 rows, data has 7"
This is the code I'm using
final_df$Value <- paste("Value",seq(1:length(unique(final_df$Value))))
Value
Value 1
Value 1
Value 1
Value 2
Value 3
Value 3
Value 3
create function that does the job:
call function:
result:
generalization: