13

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?

Brandon Bertelsen
  • 43,807
  • 34
  • 160
  • 255

3 Answers3

22

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

Aaron left Stack Overflow
  • 36,704
  • 7
  • 77
  • 142
17

From the Examples section of ?library:

 ## if you want to mask as little as possible, use
 library(mypkg, pos = "package:base")
Joshua Ulrich
  • 173,410
  • 32
  • 338
  • 418
8

You can just use stats::reorder()

nico
  • 50,859
  • 17
  • 87
  • 112