R: 2 Different Computers: Getting "Error: All arguments must be named" in R

Viewed 690

I am using the following command to change the column name in a data frame:

df <- rename(df, c("N1" = "N2"))

It works perfectly fine with pair programming partner but I keep getting the following error: "Error: All arguments must be named".

What could this error be caused by?

1 Answers

We can use

rename(head(mtcars), c("mpg1" = "mpg"))
Related