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