Title: | Pipe a function into help() |
---|---|
Description: | After using autocomplete on a function, instead of scrolling to the front of the function to use the question mark to access the help page, this package allows you to pipe the function into a wrapper help function for easier access. |
Authors: | Eric Leung [aut, cre] |
Maintainer: | Eric Leung <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.0.0.9000 |
Built: | 2024-10-27 03:48:40 UTC |
Source: | https://github.com/erictleung/hp |
Recursively constructs Abstract Syntax Tree for a given expression
getAST(ee)
getAST(ee)
ee |
expression |
list
https://stackoverflow.com/a/52080518/6873133
getAST(quote(a %>% b))
getAST(quote(a %>% b))
This function allows you to pipe forward functions to open its help page.
h(x)
h(x)
x |
expression |
Using the pipe operator is commonplace and can influence the way you think
about using functions. When looking up help pages, it is typical to add a
question mark ?
to the beginning of a function open its help page (e.g.,
?dim
). This function allows you to write left-to-right and simply pipe the
function of interest into h
to open its help page.
None
https://stackoverflow.com/a/52080518/6873133
# Simple single function eval %>% h # Simple single function with parentheses dim() %>% h # Function but specifying package dplyr::across %>% h # Function but specifying package with parentheses dplyr::summarise() %>% h # Fails iris %>% dplyr::mutate %>% h iris %>% dplyr::mutate() %>% h
# Simple single function eval %>% h # Simple single function with parentheses dim() %>% h # Function but specifying package dplyr::across %>% h # Function but specifying package with parentheses dplyr::summarise() %>% h # Fails iris %>% dplyr::mutate %>% h iris %>% dplyr::mutate() %>% h