Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/revodavid/rlangtip

R package to generate a helpful tip about R
https://github.com/revodavid/rlangtip

Last synced: about 1 month ago
JSON representation

R package to generate a helpful tip about R

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%"
)
```
# rlangtip rtip

An R package to print out a useful tip in R. Based on the history of the [@RLangTip](http://twitter.com/RLangTip) Twitter account.

```{r, echo=FALSE, message=FALSE}
joined <- readr::read_csv("data-raw/joined.csv")

library(ggplot2)
library(ggrepel)

ggplot(joined, aes(score)) +
geom_histogram(binwidth = 10, fill = "light blue", color = "black") +
labs(x = "Popularity Score",
y = "Count",
title = "@RLangTip on Twitter",
subtitle = "Popularity score based on both retweets and favorites") +
theme_minimal()

ggplot(joined, aes(favorite_count, retweet_count, label = text)) +
geom_text_repel(
data = subset(joined, retweet_count > 105),
segment.size = 0.2,
segment.color = "grey50",
direction = "x"
) +
geom_jitter(color = "light blue") +
theme_minimal() +
labs(title = "Top Tweets by Favorites and Retweets",
x = "Favorite Count",
y = "Retweet Count")

```

## Installation

This package isn't yet on CRAN. To install, use

```
devtools::install("revodavid/rlangtip")
```

## Usage

After loading the package, use:

```
rtip()
```

to generate a random tip. See `help(rtip)` for more options.

Would you like to contribute a tip to this package? See [Contributions.md](Contributions.md) for details or run the `submit_tip` function `r emo::ji("smile")`.

## Contributors

This package was created during the [Chicago R Unconference](https://chirunconf.github.io/), March 9-10 2019 by:

Benjamin Crary (@benjamincrary)
Amanda Dobbyn (@aedobbyn)
Jim Hester (@jimhester)
Caroline Kinnen (@carolinekinnen)
E. Auden Krauska (@krauskae)
David Smith (@revodavid)
Belinda Zo (@belindazo)
... and everyone who contributed a tip to this package.

Please note that the 'rlangtip' project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By contributing to this project, you agree to abide by its terms.