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

前端 未结 4 1334
無奈伤痛
無奈伤痛 2020-11-30 00:59

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

4条回答
  •  星月不相逢
    2020-11-30 01:37

    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

提交回复
热议问题