knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
The goal of offensiveR is to help check for misspelled that are not caught with normal spells checking because they are misspelled to an offensive word.
Examples include:
This package crosscheck with a quite large list of words, many of which will not be found offensive to most, but it deemed a good starting point.
You can install offensiveR from github with:
# install.packages("offensiveR") devtools::install_github("EmilHvitfeldt/offensiveR")
This is a basic example which shows you how to solve a common problem:
library(offensiveR)
The package consists of two major functions. offensive_check_files()
and offensive_check_string()
. offensive_check_files()
takes a vector of paths to files, and returns the possible offensive words and their location.
offensive_check_files(c("README.Rmd"))
offensive_check_string()
takes a character string as input, and can be quite handy if you need to check an email you are about to send.
text <- "Dear Jones The task you ask me will we hard to do since the ass is hard to measure in motion. It will be hard to asses, butt I think we will manage. Regards Tom" offensive_check_string(text)
All functions comes with the two arguments words_add
and words_ignore
to add words to look for, and words to ignore respectively.
As of version 0.1.0 also include addin support for offensive_check_string
.
This package would not have been made have I not gotten the Idea from this tweet
Despite having sent out emails and surveys to 20K+ people countless times before, I still get nervous each time I have to do it 😂
— Jesse Maegan (@kierisi) 28. oktober 2017
< Ad the spelling package which much of the package is based on.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.