I have a set of data that I am importing from a csv
info <- read.csv("test.csv")
here is an example of what it would look like
name type purchase
1 mark new yes
2 steve old no
3 jim old yes
4 bill new yes
What I want to do:
I want to loop through the purchase column and change all the yes's to True & no's to be False. Then loop through the type column and change all the old's to customer.
I've tried to mess with all the different apply's and couldnt get it to work. Also Ive tried a bunch of the methods in this thread Replace a value in a data frame based on a conditional (`if`) statement in R but still no luck.
Any help or guidance would be much appreciated!
Thanks, Nico