Skip to content

About

An R package for randomized compliments and farewells, tunable from sincere through backhanded to pseudo-Shakespearean. Started in a posit::conf(2026) workshop with Posit Assistant and reworked with Claude. Not serious; tested anyway. The strong profanity tier ships explicit language.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

pleasantry

pleasantry is a toy package that generates randomized compliments and farewells, from sincere encouragement to backhanded grumbling to pseudo-Shakespearean absurdity. Use it to add a bit of positivity (or hostility, or iambic flair) to scripts, apps, and console output.

Installation

You can install the development version of pleasantry like so:

# install.packages("pak")
pak::pak("amelia-m/pleasantry")

Compliments

compliment() generates one or more random compliments:

library(pleasantry)

set.seed(101)
compliment()
#> [1] "You have a remarkably resilient spirit."
compliment(3)
#> [1] "Few people have a work ethic as generous as yours."
#> [2] "Your sense of humor is nothing short of inspiring."
#> [3] "Few people have a mind as inspiring as yours."

Weirdness

The weirdness argument moves content along a spectrum from sincere (0) through quirky (0.5) to bizarre (1), with adjacent tiers blending at intermediate values:

set.seed(202)
compliment(weirdness = 0.5)
#> [1] "Your aggressively pleasant email sign-off could headline a very small festival."
compliment(weirdness = 1)
#> [1] "Your belly button lint hums with a frequency only suspiciously glowing whales can hear."

Mood

The mood argument sets the tone: "sincere" (default), "grumpy" (backhanded), "cheerful", or "dramatic":

set.seed(303)
compliment(mood = "grumpy")
#> [1] "Nobody asked for your uninspired parking job, and yet."
compliment(mood = "dramatic")
#> [1] "The heavens themselves weep at your transcendent legacy."

Profanity and Shakespearean styling

profanity controls the spice level: "none" (default), "tame" (funny clean words like “fudging” and “oh, fudge-muffins”), "mild" (e.g. “damn”), "strong" (explicit), or "weird" (an extra-weird clean set like “blorping” and “you magnificent space walrus”). shakespearean = TRUE switches to pseudo-Shakespearean language. Both compose with mood and weirdness:

Note: the "strong" tier ships explicit language in the package source.

set.seed(404)
compliment(mood = "grumpy", profanity = "tame")
#> [1] "It's honestly surprising how flipping not entirely terrible your reply-all is, considering."
compliment(mood = "grumpy", profanity = "weird")
#> [1] "It's honestly surprising how heckity-heck adequate your parking job is, considering."
compliment(mood = "dramatic", shakespearean = TRUE)
#> [1] "Behold! A name so undying the gods themselves do tremble!"
compliment(mood = "grumpy", shakespearean = TRUE, weirdness = 1)
#> [1] "Alchemy cannot explain thy fey aura."

Farewells

farewell() generates random goodbyes with the same mood, profanity, and shakespearean options:

set.seed(505)
farewell()
#> [1] "Goodbye, and thank you for being you."
farewell(mood = "grumpy")
#> [1] "Leaving already? Best news I have heard all day."
farewell(mood = "cheerful", shakespearean = TRUE)
#> [1] "Parting? Nay -- a celebration of thy next adventure!"

Compliment and farewell of the day

compliment_of_the_day() and farewell_of_the_day() return a single result that is deterministic for a given date, without disturbing the global RNG state:

compliment_of_the_day("2026-01-01")
#> [1] "Few people have a judgment as wonderful as yours."
farewell_of_the_day("2026-01-01", mood = "grumpy")
#> [1] "Off you go. Don't make it weird."

A compliment every time R starts

R runs your user .Rprofile at the start of every session, including a restart. usethis::edit_r_profile() opens it, creating it if needed; on Windows it is usually in your Documents folder. Add:

if (interactive() && requireNamespace("pleasantry", quietly = TRUE)) {
  message(pleasantry::compliment())
}

interactive() keeps the compliment out of Rscript, R CMD check and knitting, and requireNamespace() keeps a missing package from breaking startup. Calling pleasantry::compliment() without library() leaves your search path alone, and message() keeps the compliment out of any output you capture.

Swap in compliment_of_the_day() for the same compliment all day, or pass any arguments you like, such as compliment(mood = "grumpy", weirdness = 0.5). To say goodbye when R closes, add:

.Last <- function() if (interactive()) message(pleasantry::farewell())

A project’s own .Rprofile, such as the one renv writes, replaces your user one. To keep the compliment in such a project, add source("~/.Rprofile") at the top of the project’s file.

How this was built

Written at posit::conf(2026) in Hadley Wickham and Jenny Bryan’s Modern R workflow (ft. Positron and AI) workshop on Monday, September 14, using Positron Assistant throughout, and built out afterwards until the workshop’s allocated AI credits ran out. The rename to pleasantry, the move to the repository root, the later rounds of defect fixes and the expanded word lists were done with Claude Code.

The full development conversation with Positron Assistant is kept on the dev-transcripts branch as Markdown, HTML and JSON, so the workflow that produced the package is readable alongside the result – design dead ends included: the weirdness argument went through four designs before the three-tier version, and a late refactor collapsed two redundant arguments into the single five-level profanity. A much shorter summary is in dev-history.md.

It lives on its own branch because it is 15 MB against a 12 KB package, and installing from GitHub fetches a snapshot of the default branch.

About

An R package for randomized compliments and farewells, tunable from sincere through backhanded to pseudo-Shakespearean. Started in a posit::conf(2026) workshop with Posit Assistant and reworked with Claude. Not serious; tested anyway. The strong profanity tier ships explicit language.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages