Dplyr: rename problems

Created on 5 Sep 2015  ·  3Comments  ·  Source: tidyverse/dplyr

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.

Most helpful comment

might have a conflict with another package, did you try "dplyr::rename"?

All 3 comments

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.

http://stackoverflow.com/questions/26371279/dplyr-0-3-0-2-rename-idiom-unstable-when-reshape-package-is-loaded

might have a conflict with another package, did you try "dplyr::rename"?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

DasHammett picture DasHammett  ·  3Comments

rgayler picture rgayler  ·  5Comments

steromano picture steromano  ·  4Comments

ggrothendieck picture ggrothendieck  ·  4Comments

JohnMount picture JohnMount  ·  3Comments