SyntaxFix
Write A Post
Hire A Developer
Questions
You can create the vector idnat2 without if and ifelse.
idnat2
if
ifelse
The function replace can be used to replace all occurrences of "colony" with "overseas":
replace
"colony"
"overseas"
idnat2 <- replace(idbp, idbp == "colony", "overseas")