2

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?

questionmark
  • 335
  • 1
  • 13

1 Answers1

1

We can use

rename(head(mtcars), c("mpg1" = "mpg"))
akrun
  • 874,273
  • 37
  • 540
  • 662