When I was trying to fit in the below mentioned function.
I was getting a following error:
Error:
Error in mutate_impl(.data, dots) :
Evaluation error: This function should not be called directly
We don't really have enough info to help you out. Could you ask this with a minimal REPRoducible EXample (reprex)? A reprex makes it much easier for others to understand your issue and figure out how to help.