Alex Rivera | Logout

R: 2 functions with the same name in 2 different packages

Asked 2011-04-06T10:01:08.850
81

I need to load to R packages : tseries and chron

Both have a function named is.weekend

I always have in my environment the function from the second package I loaded.

How can I access always the function from, let say, chron ?

Edit
Report

1 Answer

5
library(chron)
is.weekend.chron <- is.weekend
library(tseries)

then you can call is.weekend for the tseries version or is.weekend.chron for the chron version

answered 2011-04-06T10:16:15.713

Your Answer