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 Twitter account.

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 for details or run the submit_tip function r emo::ji("smile").

Contributors

This package was created during the Chicago R Unconference, 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. By contributing to this project, you agree to abide by its terms.



revodavid/rlangtip documentation built on May 12, 2019, 4:13 p.m.