So I've written this function here which renames the first column in a data frame:
{
df %>%
rename({{newname}} := colnames(df[1]))
}
It ran completely fine. Now when I moved this function to a package I' m building, it suddenly started giving me this error: Error: :=
can only be used within dynamic dots.
I have imported rlang into my package so that's not the problem (before I did that it gave me a different error about not recognizing := at all).
I have no idea what has changed by moving the function to a different folder and google is not much help either.