I have a dataframe df with columns payment_type and payment_amount.
I want to do a conditional mutate such that if payment_type is "tpt" or "trt", it should make the payment_amount 5 times.
df$payment_amount<-df%>%select(payment_amount)%>%filter(payment_type=='tpt' | payment_type=='trt')%>%mutate(payment_amount=payment_amount*100)
But this isn't working. TIA