Learn R Programming

berryFunctions (version 1.4)

yearSample: Nonrandom year with sample

Description

Nerdy way to wish someone a happy new year by using sample. Can especially impress newbies a lot.

Usage

yearSample(year)

Arguments

year
4 digit numerical year.

Value

  • cats command into the console that can be copypasted to anyone's R script.

See Also

nameSample to impress with "randomly" finding a name, set.seed, sample, letters

Examples

Run this code
yearSample(2015)
# Have a nerdy
set.seed(1244); sample(0:9, 4, replace=TRUE)

Run the code above in your browser using DataLab