How to present a function result as a string of characters in another function ?

I have Table “A” and I would like to add a column to this Table with values equal 0 whose name will contain the name from the Column “i” ('variable') with the additional inscription '_outliers'.
I do it as follows. I create a working variable 'name', which takes the value of 'variable_outliers', unfortunately the code: mutate (name = 0) does not work. What I do wrong ? How to correct this code?

name<-paste(names(A)[i],"_outliers",sep="")
A%>%
  mutate(name=0)->A

Please give an example input data.frame and desired output. Use the reprex package to paste code if you want faster answers.

BTW you have incorrectly tagged this question to Rstudio IDE.
It is not an IDE question. It is a general R question. Please replace the tag too.

Thanks

SM

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.