项目作者: sbha

项目描述 :
Generate fake English town names
高级语言: R
项目地址: git://github.com/sbha/englishtowns.git
创建时间: 2019-03-09T02:33:10Z
项目社区:https://github.com/sbha/englishtowns

开源协议:

下载


englishtowns

Overview

A function for creating fake English, Irish, and German town names.

Installation

  1. # install.packages("devtools")
  2. devtools::install_github("sbha/englishtowns")

Usage

The default is to generate an English town:

  1. library(englishtowns)
  2. generate_town()
  3. #> Greathamrough

Setting the country argument to ‘Ireland’ will generate an Irish name:

  1. generate_town(country = 'Ireland')
  2. #> Ballyalliagh

Setting the country argument to ‘Germany’ will generate a German name:

  1. generate_town(country = 'Germany')
  2. #> Neustaberheim

Maybe you can do something fun with it:

  1. paste0('I was born in ',
  2. generate_town(),
  3. ', England, went to university in ',
  4. generate_town('Ireland'),
  5. ', Ireland, and now live in ',
  6. generate_town('Germany'),
  7. ', Germany.')
  8. #> "I was born in Easthippingford, England, went to university in Balliallymore, Ireland, and now live in Neustadtstahausen, Germany."

Data Sources

English towns: Wikipedia
Irish towns: Wikipedia
German towns: Wikipedia