Skip to content

nutterb/sillylogic

Repository files navigation

Travis-CI Build Status Coverage Status

sillylogic

Emote via Logical Constants

Inspired by the discussion on Twitter, sillylogic provides some fun alternatives to use in place of TRUE and FALSE. Most famously:

devtools::install_github("nutterb/sillylogic")
library(sillylogic)
x <- data.frame(letter = letters[1:10],
                stringsAsFactors = HELLNO)

Which ensures that strings are not converted to factors when the data frame is assigned.

class(x$letter)
## [1] "character"

Available Logical Representations

TRUE FALSE
COUNTMEIN ASIF
HELLYES HELLNO
WHYNOT NO
YES NOTHANKS
YESPLEASE NOWAY

And for those who like to live a little dangerously, feel free to use the surprise_me function.

set.seed(2)
x <- data.frame(letter = letters[1:10],
                stringsAsFactors = surprise_me())
class(x$letter)
## [1] "factor"
y <- data.frame(letter = letters[1:10],
                stringsAsFactors = surprise_me())
class(y$letter)
## [1] "character"

About

Fun representations of boolean values.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages