Learn R Programming

berryFunctions (version 1.22.5)

yearSample: Nonrandom year with sample

Description

Nerdy way to wish someone a happy new year by using sample

Usage

yearSample(year)

Value

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

Arguments

year

4 digit numerical year.

Author

Berry Boessenkool, berry-b@gmx.de, April 2014

Details

Nerdy way to wish someone a happy new year, eg:
Have a great
set.seed(1244); sample(0:9,4,T)

See Also

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

Examples

Run this code

yearSample(2016)
# Have a nerdy
set.seed(12353); sample(0:9, 4, replace=TRUE)

Run the code above in your browser using DataLab