Reputation: 424
I'm building an R package and I want to set the aliases (alternative names) for some functions. I want to set them while loading a package. I tried with .onLoad It looked like that :
.onAttach <- function(lib,pkg = "mypkg") {
fun1a <- fun1
fun2a <- fun2
}
but after building, installing and loading the package no aliases were visible.
Do you have idea how to solve a problem with aliases?
Upvotes: 2
Views: 571
Reputation: 9696
I have this in my utils package and it works to alias ln to log:
#' @export
ln <- log;
Upvotes: 1