Jie Tang
2012-Mar-17 09:03 UTC
[R] how to call functions with same name but in different package?
hi everyone . I am trying to use some packages but there are some functions have the same name in different package. for example dwt function both in packages wavelets and waveslim dwt(X, filter="la8", n.levels, boundary="periodic") How can I avoid mixing them up ? -- TANG Jie Email: totangjie@gmail.com Tel: 0086-2154896104 Shanghai Typhoon Institute,China [[alternative HTML version deleted]]
De-Jian Zhao
2012-Mar-17 09:34 UTC
[R] how to call functions with same name but in different package?
Rename the functions after loading the library. library("wavelets") dwt.wavelets <- dwt library("waveslim") dwt.waveslim <- dwt Then use dwt.wavelets and dwt.waveslim instead. On 2012-3-17 17:03, Jie Tang wrote:> hi everyone . > > I am trying to use some packages but there are some functions have the same > name in different package. > for example > > dwt function > > both in packages wavelets and waveslim > > dwt(X, filter="la8", n.levels, boundary="periodic") > > How can I avoid mixing them up ? > >
Prof Brian Ripley
2012-Mar-17 10:02 UTC
[R] how to call functions with same name but in different package?
On 17/03/2012 09:34, De-Jian Zhao wrote:> Rename the functions after loading the library. > > library("wavelets") > dwt.wavelets <- dwt > library("waveslim") > dwt.waveslim <- dwt > > Then use dwt.wavelets and dwt.waveslim instead.Please, not necessary! Use wavelets::dwt or waveslim::dwt to distinguish them.> > On 2012-3-17 17:03, Jie Tang wrote: >> hi everyone . >> >> I am trying to use some packages but there are some functions have the >> same >> name in different package. >> for example >> >> dwt function >> >> both in packages wavelets and waveslim >> >> dwt(X, filter="la8", n.levels, boundary="periodic") >> >> How can I avoid mixing them up ? >> >> > > ______________________________________________ > 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.-- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
De-Jian Zhao
2012-Mar-17 10:48 UTC
[R] how to call functions with same name but in different package?
Much better! Thanks. On 2012-3-17 18:02, Prof Brian Ripley wrote:> On 17/03/2012 09:34, De-Jian Zhao wrote: >> Rename the functions after loading the library. >> >> library("wavelets") >> dwt.wavelets <- dwt >> library("waveslim") >> dwt.waveslim <- dwt >> >> Then use dwt.wavelets and dwt.waveslim instead. > > Please, not necessary! > > Use wavelets::dwt or waveslim::dwt to distinguish them. > >> >> On 2012-3-17 17:03, Jie Tang wrote: >>> hi everyone . >>> >>> I am trying to use some packages but there are some functions have the >>> same >>> name in different package. >>> for example >>> >>> dwt function >>> >>> both in packages wavelets and waveslim >>> >>> dwt(X, filter="la8", n.levels, boundary="periodic") >>> >>> How can I avoid mixing them up ? >>> >>> >> >> ______________________________________________ >> 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. > >