Alright, so I want to turn all the factor levels (they are letters eg. 'a', 'A', 'b', 'B') into lowercase and add their corresponding values (from another variable):
# SIMPLIFIED VERSION OF MY ORIGINAL CODE
letters_01 <- c("a", "A", "b", "B", "c", "C", "d", "D", "e", "E", "f", "F", "g", "G")
letters_02 <- c(1, 2, 1, 4, 5, 6, 3, 8, 9, 1, 11, 12, 13, 14)
letters.df.test <- data.frame(letters_01, letters_02)
When the uppercase levels become lowercase and therefore become the same level as they would now both be eg. a. (both would be lowercase) Okay take 'b' and 'B', when the uppercase version becomes lowercase I want it so there wouldn't be two lowercase 'b's, I also need to add the values for both 'b' and 'B' for example, 'b' = 4 and 'B' = 5 the new singular lowercase 'b' would equal 9.