- Home
- CRAN
**berryFunctions**: Function Collection Related to Plotting and Hydrology**yearSample**: Nonrandom year with sample

# Nonrandom year with sample

### Description

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

### Usage

1 | ```
yearSample(year)
``` |

### Arguments

`year` |
4 digit numerical year. |

### Details

Nerdy way to wish someone a happy new year, eg:

Have a great

`set.seed(1244); sample(0:9,4,T)`

### Value

`cat`

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

### Author(s)

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

### See Also

`nameSample`

to impress with "randomly" finding a name,
`set.seed`

, `sample`

, `letters`

### Examples

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

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.

- addAlpha: Color transparency
- addFade: Color fade out
- addRows: Add n rows to a data.frame
- anhang: open the Appendix of Rclick
- approx2: Smart linear NA interpolation
- berryFunctions-package: Berry's functions
- betaPlot: Beta density plot
- betaPlotComp: Compare beta distributions
- checkFile: check file existance
- ci: calculate confidence interval around mean
- ciBand: polygon confidence bands
- cie: Extended confidence interval
- circle: Draw circle with a given radius
- classify: Classification into groups
- climateGraph: climate graph after Walter and Lieth
- cls: clear console by function - does not work!
- colPoints: Points colored relative to third dimension
- colPointsHist: Histogram for colPoints
- colPointsLegend: Legend for colPoints
- combineFiles: Combine Textfiles into one
- compareFiles: Compare textfiles for equality
- createDoc: Create Documentation file from r-source
- createFun: create function framework
- dataDWD: download data from DWD
- dataStr: str of datasets
- distance: Distance between points
- divPal: Diverging color palette
- dupes: Duplicate lines in file
- exp4p: 4-parametric exponential function
- expReg: Exponential regression with plotting
- exTime: Time to run examples
- funnelPlot: Funnel plots for proportional data
- funSource: Source code of a function
- funTinn: Open function in TinnR
- getColumn: get column from data.frame
- getName: get the name of an input in nested function calls
- gof: GOF measures
- googleLink2pdf: extract pdf link from google search result
- groupHist: Histogramm for classes
- headtail: head and tail
- horizHist: Horizontal histogram
- insertRows: insert rows to data.frame
- instGit: install github package
- is.error: Check if an expression returns an error
- l2df: List to data.frame
- library2: install.package and require
- lim0: axis limits with one end at zero
- linLogHist: lin-log transition histogram
- linLogTrans: Animation for transition from linear to logarithmic axis
- linReg: linear regression with plotting
- locArrow: arrow at locator point in graph
- locLine: abline at locator point in graph
- logAxis: Label logarithmic axes
- logHist: Histogram of logarithmic values
- logSpaced: Logarithmically spaced points
- logVals: Create log-axis values and labels
- lsc: Linear storage cascade, unit hydrograph
- lsMem: Show memory size of objects in MB
- monthAxis: Label date axis
- monthLabs: Nicely spaced labels along a month
- movAv: Moving average
- movAvLines: Moving average with different window widths
- mReg: Multiple regression
- na9: Prepend spaces before na.strings
- nameSample: Nonrandom character sequence with sample
- normPlot: Normal density plot
- owa: Overwrite argument default lists
- panelDim: Arrange panels in a multipanel plot (par mfrow)
- pastec: Paste with collapse = ", "
- pointZoom: zoom in originally static x11 graphics
- pretty2: Truncated pretty breakpoints
- quantileBands: Quantile bands
- quantileMean: Average of R's quantile methods
- rainbow2: Rainbow from blue to red
- readDWD: process data from DWD
- removeSpace: Remove white spaces from strings
- rescale: shift and scale a vector
- runAxis: Label axis with typical running times
- seasonality: Seasonality analysis
- seqPal: Sequential color palette
- seqR: seq with a range argument
- showPal: show color palettes
- smallPlot: Inset small plot within figure
- smoothLines: draw smoothed lines
- sortDF: sort dataframes by column
- spiralDate: Spiral graph of time series
- spiralDateAnim: Animated spiral graph
- superPos: superposition of discharge, unit hydrograph
- tableColVal: Table with values with value-dependent colored backgrounds in...
- textField: Write text to plot with halo underneath
- TFtest: Test logical expressions
- timer: Timer alarm
- toupper1: capitalize words
- traceCall: call stack of a function
- unitHydrograph: Unit Hydrograph
- yearSample: Nonrandom year with sample