Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ARawles/packageR

An R package to inspect R packages
https://github.com/ARawles/packageR

developer-tools development r

Last synced: 2 months ago
JSON representation

An R package to inspect R packages

Awesome Lists containing this project

README

        

---
output: github_document
---

```{r setup, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%")
devtools::load_all()
```

# PackageR

The goal of PackageR is to to help users better understand their package. When developing R packages, it's easy to lose track of the scale of the project. This package provides functions to give developers a better insight into the number of functions, files, and their length. From here, developers can work to identify overly-complex functions or chokepoints and eventually write cleaner code.

## Installation

You can install the development version from [GitHub](https://github.com/ARawles/PackageR) with:

``` r
# install.packages("devtools")
devtools::install_github("ARawles/packageR")
```
## Example

To get a high-level understanding of the functions and files in your package, use the `plot_` functions. These functions will produce ggplot2 graphics showing you a bit more about your package:

```{r}
plot_function_length()
```

To access the data in a more raw format, use the `list_functions()` and `list_x_files()` functions:

```{r}

list_functions()

list_r_files()
```

By setting the `info` parameter to TRUE, you can retrieve more information about the functions:

```{r}
list_functions(info = TRUE)[[1]]
```