Learn R Programming

RCPA3 (version 1.3.1)

random.names: Generates random sample of nationally representative surnames

Description

Generates a random sample of surnames of any length. Surnames and probabilities from Census Bureau, see <https://www.census.gov/topics/population/genealogy/data/2010_surnames.html>. Used to illustrate random sampling methods.

Usage

random.names(n)

Value

A vector of surnames

Arguments

n

The number of random surnames to be generated

RCPA3 Package Tutorial Videos

* [Complete Playlist of RCPA3 Package Tutorial Videos](https://www.youtube.com/playlist?list=PL3jY4WDTUxoNqrxSSQH4q7XPLPYipeNCu), includes video for this function and many more.

Examples

Run this code
   library(RCPA3)
   
   random.names(10)

Run the code above in your browser using DataLab