I\'ve created a simple data frame (dput below):
dput
date ticker value ------------------------------ 2016-06-30 A2M.ASX 0.0686 2
With the newest dplyr (>0.7.0) you would use
rename(df, !!metric:=value)
The syntax is "new_name=old_name" and you need to use := with !! to put a variable on the left side of a parameter name.
:=
!!