Yanika Borg
2011-Jan-24 22:47 UTC
[R] Masking commands - Permutation in gregmisc and e1071
I am using the function permutations from the package *gregmisc*. However, I am also making use of the package *e1071*, which also contains a function called permutations. I want to use the function permutations from the * gregmisc* package, however, the other package is masking this function. This happens both when I load the *e1071* package before *gregmisc* and when I load *e1071* after I load *gregmisc*. Is there any specific command to use the permutation from one package and not the other please? Many thanks. [[alternative HTML version deleted]]
Peter Langfelder
2011-Jan-24 22:53 UTC
[R] Masking commands - Permutation in gregmisc and e1071
On Mon, Jan 24, 2011 at 2:47 PM, Yanika Borg <akinay.b at gmail.com> wrote:> I am using the function permutations from the package *gregmisc*. However, I > am also making use of the package *e1071*, which also contains a function > called permutations. I want to use the function permutations from the * > gregmisc* package, however, the other package is masking this function. This > happens both when I load the *e1071* package before *gregmisc* and when I > load *e1071* after I load *gregmisc*. > > Is there any specific command to use the permutation from one package and > not the other please?To specify package when you call a function, use package::function(...), for example gregmisc::permutations. Peter
On 24.01.2011 23:53, Peter Langfelder wrote:> On Mon, Jan 24, 2011 at 2:47 PM, Yanika Borg<akinay.b at gmail.com> wrote: >> I am using the function permutations from the package *gregmisc*. However, I >> am also making use of the package *e1071*, which also contains a function >> called permutations. I want to use the function permutations from the * >> gregmisc* package, however, the other package is masking this function. This >> happens both when I load the *e1071* package before *gregmisc* and when I >> load *e1071* after I load *gregmisc*. >> >> Is there any specific command to use the permutation from one package and >> not the other please? > > To specify package when you call a function, use > package::function(...), for example > gregmisc::permutations.You may also want to read about the NAMESPACE mechanism in R. Best, Uwe Ligges> > Peter > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.