It may just be me, but I continue to have problems "rename" in dplyr, even in version 0.4.3. You can replicate the problem here:
a <- c(1, 2, 3)
b <- c(10, 20, 30)
c <- data.frame(a,b)
c
This worked fine. Then:
rename(c, z=a)
Error in rename(c, z = a) : unused argument (z = a)
I tried the reverse as well:
This gives an error:
Error in rename(c, a = z) : unused argument (a = z)
> R.Version(
+ )
$platform
[1] "x86_64-pc-linux-gnu"
$arch
[1] "x86_64"
$os
[1] "linux-gnu"
$system
[1] "x86_64, linux-gnu"
$status
[1] ""
$major
[1] "3"
$minor
[1] "1.3"
$year
[1] "2015"
$month
[1] "03"
$day
[1] "09"
$`svn rev`
[1] "67962"
$language
[1] "R"
$version.string
[1] "R version 3.1.3 (2015-03-09)"
$nickname
[1] "Smooth Sidewalk"
I've looked for "dumb" moves on my part creating this issue, but I can't find any.
Try in a fresh R session - looks like you have something overriding rename
I had the same issue and it did not go away despite restarting the session. I loaded tidyr, dply, and plyr in my session. So that was causing the issue. I found the answer in this post on stack overflow.It resolved my issue.
might have a conflict with another package, did you try "dplyr::rename"?
Most helpful comment
might have a conflict with another package, did you try "dplyr::rename"?