generate: Generate An Emoji Scene

Description Usage Arguments Details Value Examples

View source: R/emojiscape.R

Description

Print to the console a randomised scene composed of emoji, given a specific terrain type.

Usage

1
2
3
4
5
6
7
8
9
generate(
  terrain = c("arable", "city", "desert", "forest", "garden", "liminal", "mountains",
    "ocean", "pastoral", "polar", "rainforest", "sky", "space", "suburbs", "traffic",
    "undergrowth", "woods"),
  grid_size = 10,
  prob_common = 0.75,
  prob_uncommon = 0.2,
  prob_rare = 0.05
)

Arguments

terrain

Character. What type of locale? See 'details' below for options.

grid_size

Numeric, greater than zero. Width and length of the emoji matrix.

prob_common

Numeric. Probability of occurrence for the 'common' emoji in the terrain set.

prob_uncommon

Numeric. Probability of occurrence for the 'uncommon' emoji in the terrain set.

prob_rare

Numeric. Probability of occurrence for the 'rare' emoji in the terrain set.

Details

Your terrain choice results in the selection of a predetermined three- emoji set, from which a sample is taken to fill a square matrix with dimensions of grid_size.

Currently, terrain options are "arable", "city", "desert", "forest", "garden", "liminal", "mountains", "ocean", "pastoral", "polar", "rainforest", "roads", "sky", "space", "undergrowth" and "woods".

The prob_* arguments are passed to sample() and are relative to each other.

Value

Class NULL. Matrix of emoji printed to the console line by line with cat().

Examples

1
generate("ocean")

matt-dray/emojiscape documentation built on Dec. 21, 2021, 2:54 p.m.