Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

R: Masked Functions [duplicate]

Tags:

r

In the stats package, there is a highly useful function called reorder(). In the gdata package, there is also a function called reorder().

How do I force reorder() from stats, not to be overwritten when loading the gdata package? Or, is there a way to reference which reorder() you want to use?

like image 586
Brandon Bertelsen Avatar asked Feb 02 '11 20:02

Brandon Bertelsen


2 Answers

Use stats::reorder() to reference the version in stats.

like image 200
Aaron left Stack Overflow Avatar answered Sep 22 '22 07:09

Aaron left Stack Overflow


From the Examples section of ?library:

 ## if you want to mask as little as possible, use
 library(mypkg, pos = "package:base")
like image 41
Joshua Ulrich Avatar answered Sep 18 '22 07:09

Joshua Ulrich