Hello and welcome to my question.
I want to create a list of unique, numerical, position-based identifiers to denote the position of items in a column of values in a dataframe.
Here's an example of what I want (in column Position):
tibble(Fruit = c(rep("Apple", 3), rep("Pear", 2), rep("Orange", 4)),
Variety = c("Gala", "Envy", "Pink Lady", "Anjou", "Bartlett", "Blood", "Seville", "Mandarin", "Bergamot"),
Position = c(1.1, 1.2, 1.3, 2.1, 2.2, 3.1, 3.2, 3.3, 3.4))
As you can see, the whole number value of the identifier denotes Fruit, while the decimal value denotes the Variety.
I'd like a method to create these unique position identifiers for use in another project (using ganttrify, an excellent but particular function). Bonus points for a dplyr-friendly solution.