unused arguments error in Dplyr Select

Problem:
Getting “unused argument” error while using Select ()Function from Dplyr.

Solution:

I have used the select () function from Dplyr before and it worked perfectly. But today suddenly I got “unused argument” error like below.

I checked the arguments for the select() and it seemed correct. Then I had a doubt if there is a “Select()” function in any other libraries that I have installed recently. And Yes! “MASS” library has a Select() Function and can be checked with the below command:

ls("package:MASS")

So, the solution to this problem is to specify the library while using the function as below and I got the output as expected:

 

1

9 comments

  1. lolo

    Yeah, thanks for this! I don't even recall having updated any packages, but from one day to the next I had the same problem. Your post saved me hours or even days of trying to find out why it suddenly wouldn't work anymore.

  2. Anonymous

    Thank you very much! This post not only solved my problem but also taught me something about the importance os masking and the "::"!

Leave a Reply

Your email address will not be published. Required fields are marked *