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
  • 42,225
  • 33
  • 153
  • 250

3 Answers3

22

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

Aaron left Stack Overflow
  • 35,618
  • 5
  • 75
  • 137
17

From the Examples section of ?library:

 ## if you want to mask as little as possible, use
 library(mypkg, pos = "package:base")
Joshua Ulrich
  • 168,168
  • 29
  • 327
  • 408
8

You can just use stats::reorder()

nico
  • 49,570
  • 17
  • 85
  • 112