SyntaxFix
Write A Post
Hire A Developer
Questions
Easier to convert nm to characters and then make the change:
junk$nm <- as.character(junk$nm) junk$nm[junk$nm == "B"] <- "b"
EDIT: And if indeed you need to maintain nm as factors, add this in the end:
junk$nm <- as.factor(junk$nm)