Documentation ๐Ÿ““

Add a roxygen block just above your function definition

Insert template with Ctrl + Alt + Shift + R or Cmd + Option + Shift + R

#' R Library Summary
#'
#' Provides a brief summary of the package libraries on your machine
#'
#' @return A data.frame containing the count of packages in each of the user's
#'   libraries
#' @export
#'
#' @examples
#' lib_summary()
lib_summary <- function() {
  ...
}

Build function documentation (man/lib_summary.Rd) from roxygen

document()

You can preview it with ?function_name

load_all()

?lib_summary

Check package to ensure documentation conforms to standards

check()

Create package-level documentation

use_package_doc()

document()

See rendered documentation at man/libminer2-package.Rd

Preview and check again

load_all()

?libminer

check()

Install your package

install()
library(libminer)

lib_summary() # note one more package than before - that's yours!

README

use_readme_rmd()
---
output: github_document
---

<!-- README.md is generated from README.Rmd. Please edit that file -->



# libminer

<!-- badges: start -->

<!-- badges: end -->

The goal of libminer is to provide an overview of your R library setup. It is a toy
package created as a part of a workshop and not meant for serious use.

## Installation

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

```r
# install.packages("devtools")
devtools::install_github("ateucher/libminer")
```

## Example usage

To get a count of installed packages in each of your library locations, 
optionally with the total sizes, use the `lib_summary()` function:

```{r example}
library(libminer)
lib_summary()
# specify `sizes = TRUE` to calculate the total size on disk of your packages
lib_summary(sizes = TRUE)
```
build_readme()
check()