Learn R Programming

generator (version 0.1.0)

r_phone_numbers: Generate random fake phone numbers.

Description

Generate random fake phone numbers.

Usage

r_phone_numbers(n, use_hyphens = FALSE, use_parentheses = FALSE, use_spaces = FALSE)

Arguments

n
number of observations.
use_hyphens
should hyphens be included.
use_parentheses
should parantheses be included.
use_spaces
should spaces be included.

Value

A character vector of n randomly generated phone numbers.

Examples

Run this code
r_phone_numbers(10)
r_phone_numbers(10, use_hyphens = TRUE)
r_phone_numbers(10, use_parentheses = TRUE)
r_phone_numbers(10, use_spaces = TRUE)
r_phone_numbers(10, use_parentheses = TRUE, use_hyphens = TRUE)
r_phone_numbers(10, use_parentheses = TRUE, use_spaces = TRUE)

Run the code above in your browser using DataLab