Dear R community
I am trying to assign alphabets to integer values 1, 2, 3 etc. in y given below. Can any body suggest some simple way to do the same job?

ds=iris; dl=nrow(ds)
c1=ds[,1]; c2=ds[,2]; c3=ds[,3]; c4=ds[,4]; c5=ds[,5]; iris=cbind(c1,c2,c3,c4,c5)
y=iris[,5]
y1=which(y==1); y[y1] <- c("a"); y2=which(y==2); y[y2] <- c("b"); y3=which(y==3); y[y3] <- c("c"); 
iris=cbind(c1,c2,c3,c4,y)

Thnks and best regards
M. Azam


      
	[[alternative HTML version deleted]]

