Learn R Programming

berryFunctions (version 1.21.2)

yearSample: Nonrandom year with sample

Description

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

Usage

yearSample(year)

Arguments

year

4 digit numerical year.

Value

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

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
# NOT RUN {
yearSample(2016)
# Have a nerdy
set.seed(12353); sample(0:9, 4, replace=TRUE)

# }

Run the code above in your browser using DataLab