Skip to content

Commit

Permalink
felp returns help rather than input function
Browse files Browse the repository at this point in the history
  • Loading branch information
atusy committed May 10, 2019
1 parent 5de5ff3 commit 96d2429
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions R/felp.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@ felp <- function (x, package = NULL, ...) {
}
package <- c(package, input[2][[1]])

# Try to find help
try(print(help(input[[1]], package = package[1], ...)))

# Print source of the function
prettycode:::print.function(get(
input[[1]],
envir = `if`(is.null(package), parent.frame(), asNamespace(package))
))

try(help(input[[1]], package = package[1], ...))

}

0 comments on commit 96d2429

Please sign in to comment.