Learn R Programming

One4All (version 0.5)

test_profanity: Test for profanity in a string

Description

This function checks if the input string contains any profane words.

Usage

test_profanity(x)

Value

A logical value indicating whether the input string contains no profane words.

Arguments

x

A character string to check for profanity.

Examples

Run this code
test_profanity("This is a clean sentence.")
test_profanity("This sentence contains a badword.")

Run the code above in your browser using DataLab