Hi,
I have this simple df.
source <-
data.frame(
stringsAsFactors = FALSE,
URN = c("aaa",
"bbb","ccc","ddd","eee","fff","ggg","hhh"),
Model = c("corsa",
"corsa electric"," opel corsa","corsa","corsa-e",
"corsa e","corsa","corsa"),
EV = c("Other",
"Electric","Electric","Other","Electric",
"Electric","Other","Electric")
)
source
I have noticed that information included must be adjusted. "EV" describes electric models so:
IF EV="Electric" than Model should be changed from "Corsa" (or from "Opel corsa") to "Corsa E".
What is the easiest way of doing that? Can you help?