# annotater
**Repository Path**: youmigo/annotater
## Basic Information
- **Project Name**: annotater
- **Description**: 给包 注释 的包。
- **Primary Language**: Unknown
- **License**: MIT
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2020-08-13
- **Last Updated**: 2024-05-30
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# annotater
[](https://codecov.io/gh/luisDVA/annotater?branch=master)
The goal of `annotater` is to annotate package load calls in character
strings and R/Rmd files, so we can have an idea of the overall purpose
of the libraries we’re loading.
### What do my loaded packages do?
### Where did I get them?
-----
The two annotation types are also available together:
Thanks to a Pull Request by [Juan Cruz
Rodriguez](https://github.com/jcrodriguez1989), we can now annotate
which functions from each package are being called in a script.
## Installation
Install the development version of `annotater` from GitHub with:
``` r
# install.packages("remotes")
remotes::install_github("luisDVA/annotater")
```
Restart RStudio after the installation for the addins to load properly.
### When using the addins, make sure the focus (blinking cursor) is on an open RStudio R file in the ‘source’ pane.
## Example
These are the possible annotations, which can be added to character
strings (with one line per element), or applied to .R or .Rmd files in
RStudio through their corresponding addins.
``` r
library(annotater)
test_string <-c("library(boot)\nrequire(Matrix)")
writeLines(annotate_pkg_calls(test_string))
writeLines(annotate_repo_source(test_string))
writeLines(annotate_repo_source(test_string))
```
Entire .R files can also be parsed and annotated with the
`annotate_script` function.
Feedback welcome
Thanks to [Jonathan Carroll](https://github.com/jonocarroll), [Fırat
Melih Yılmaz](https://twitter.com/fratmelhylmaz), and [Achaz von
Hardenberg](https://github.com/achazhardenberg) for feedback and
suggestions.