In the iris dataset, I want to replace the names setosa virginica and versicolor with a letter, then convert it to an A for example setosa with a while loop and put another letter A next to it.
so setosa = AA
virginica = BB
versicolor = CC
The code I tried only adds to the numbers, I need to do it to the letters
data(iris)
head(iris)
Burak <- iris
running_index <- 1
while(is.numeric(iris[ , running_index])) {
iris[ ,running_index] <- iris[ ,running_index] + 50
running_index <- running_index + 1
}