knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
The quoter
R package generates a random quote sourced from various sources. You can use this, say, to output an inspirational quote every time your R starts.
You can install the released version of quoter with
remotes::install_github("emitanaka/quoter")
Get a random quote that are sourced from brainy, statquotes or dadjoke.
quoter::quotes(source = "brainy")
You can get a decorated one. The color output will show on terminal.
TODO: need to add dark/light themes. Also ability to customise output easily.
quoter::decorate(quoter::quotes())
To show quote on R start-up, you will need a special function ot the .Rprofile
file. The easiest way to access the .Rprofile
is to use
usethis::edit_r_profile()
In the .Rprofile
file add below to get a quotation for every start-up.
.First <- function() { quoter::decorate(quoter::quotes()) }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.