Learn R Programming

player (version 0.1.0)

play_magic_8_ball: Ask a Magic 8 Ball a question in the console

Description

Ask a Magic 8 Ball a question in the console

Usage

play_magic_8_ball(question = NULL, header = rlang::is_interactive())

Value

A character string answering your question.

Arguments

question

A character string. Ask the Magic 8 Ball anything your heart desires. If NULL, the default, you will be prompted to type a question interactively in the console.

header

If TRUE, prints a header for the game. Defaults to TRUE if the session is interactive and FALSE otherwise.

Examples

Run this code
play_magic_8_ball("Will I ever find love?")

if (rlang::is_interactive()) play_magic_8_ball()

Run the code above in your browser using DataLab