Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/sfirke/packagemetrics

A Package for Helping You Choose Which Package to Use
https://github.com/sfirke/packagemetrics

r r-package rstats unconf unconf17

Last synced: 5 days ago
JSON representation

A Package for Helping You Choose Which Package to Use

Awesome Lists containing this project

README

        

---
title: "packagemetrics"
output: github_document
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE, message=FALSE)
```

## About packagemetrics

The packagemetrics project was a part of the 2017 rOpenSci Unconference. With over 10,000 packages on CRAN - and thousands more on GitHub and Bioconductor - a useR needs a way to navigate this wealth of options. There are many existing tools that are helpful for finding packages, but few ways to quickly compare differences between packages. We set out to create tools for comparing a set of related and potentially overlapping packages through a combination of standardized packagemetrics and an expert review process. More information about our project can be found in this [post](https://ropensci.org/blog/blog/2017/06/27/packagemetrics).

rOpenSci migrated this package to Sam Firke's GitHub account in December 2020, where it currently lives with the minimal maintenance needed to keep it working.

## Team packagemetrics:

Lori Shepherd, Hannah Frick, William Ampeh, Erin Grand, Sam Firke, Becca Krouse

## Installation
```r
devtools::install_github("sfirke/packagemetrics")
```

## Use

**Comparing dplyr and data.table:**

```{r, echo=TRUE}
library(packagemetrics)
library(dplyr)

dplyr_and_dt <- package_list_metrics(c("dplyr", "data.table"))
glimpse(dplyr_and_dt)
```

### Creating a pretty metrics_table

Here's a comparison of popular table-making packages, using the `metrics_table` function:

```{r, echo = TRUE}
pkg_df <- package_list_metrics(table_packages) # included vector of table pkgs
ft <- metrics_table(pkg_df)
```

```{r, echo=FALSE}
w <- formattable::as.htmlwidget(ft, width = 1200, height = NULL)
path <- htmltools::html_print(w, background = "white", viewer = NULL)
url <- paste0("file:///", gsub("\\\\", "/", normalizePath(path)))
webshot::webshot(url,
file = "inst/image/table.png",
selector = ".formattable_widget",
delay = 0.2)
```

## Refreshing data sources

If the cached CRAN data gets out of date, call `get_cran(forget = TRUE)` to force refreshing. This will fetch the latest results from CRAN and cache them for use going forward.

GitHub data is scraped at the time of the call to `package_list_metrics`.

## Requirements

```packagemetrics``` requires R version >= 3.4.0.