Reputation: 45
Date V1
2015-01-11 0.0
Now there are many vaules like these in my data frame. So i want all of them to be replaced by 1. I think creating another dataframe with all 0 values and then replacing them with 1 and merging again using left join will not place them back to their specific dates. Please help!
Upvotes: 0
Views: 385
Reputation: 45
I got the answer, Thanks!
df= df %>% mutate(V1 = replace(V1, V1 == '0', '1'))
Upvotes: 1