Learn R Programming

lovecraftr (version 1.2.0)

unearth_lovecraftian_tales: Retrieve Lovecraftian Tales by Name or abbreviation

Description

Search for and retrieve text from a collection of Lovecraft stories.

Usage

unearth_lovecraftian_tales(book = NULL)

Value

If a valid book is selected, a data frame with the following columns:

text

The text of the selected story.

title

The title of the selected Lovecraft story.

abbreviation

The abbreviation corresponding to the story.

If no book is specified, the function returns a data frame with two columns:

story

The name of the available story.

abbreviation

The corresponding abbreviation for each story.

Arguments

book

A character string representing the full name or abbreviation of the Lovecraft story to search for. The search is case-insensitive. If NULL, the function returns a list of all available stories and their abbreviations.

Examples

Run this code
# List all available stories
unearth_lovecraftian_tales()

# Retrieve a story by full name (case-insensitive)
unearth_lovecraftian_tales("The shadow over innsmouth")

# Retrieve a story by abbreviation (case-insensitive)
unearth_lovecraftian_tales("soi")

# Retrieve a story with partial name or abbreviation (case-insensitive)
unearth_lovecraftian_tales("call")

# Retrieve a story by abbreviation
unearth_lovecraftian_tales("RH")

Run the code above in your browser using DataLab