├── .Rbuildignore
├── .gitignore
├── .travis.yml
├── DESCRIPTION
├── LICENSE
├── NAMESPACE
├── NEWS.md
├── R
├── generator.R
├── r_credit_card_numbers.R
├── r_date_of_births.R
├── r_email_addresses.R
├── r_full_names.R
├── r_ip_addresses.R
├── r_latitudes.R
├── r_longitudes.R
├── r_national_identification_numbers.R
├── r_phone_numbers.R
└── sysdata.rda
├── README.Rmd
├── README.md
├── appveyor.yml
├── cran-comments.md
├── docs
├── LICENSE.html
├── authors.html
├── index.html
├── jquery.sticky-kit.min.js
├── link.svg
├── news
│ └── index.html
├── pkgdown.css
├── pkgdown.js
└── reference
│ ├── generator.html
│ ├── index.html
│ ├── r_credit_card_numbers.html
│ ├── r_date_of_births.html
│ ├── r_email_addresses.html
│ ├── r_full_names.html
│ ├── r_ipv4_addresses.html
│ ├── r_latitudes.html
│ ├── r_longitudes.html
│ ├── r_national_identification_numbers.html
│ └── r_phone_numbers.html
├── generator.Rproj
├── man
├── generator.Rd
├── r_credit_card_numbers.Rd
├── r_date_of_births.Rd
├── r_email_addresses.Rd
├── r_full_names.Rd
├── r_ipv4_addresses.Rd
├── r_latitudes.Rd
├── r_longitudes.Rd
├── r_national_identification_numbers.Rd
└── r_phone_numbers.Rd
└── tests
├── testthat.R
└── testthat
├── test-r_credit_card_numbers.R
├── test-r_date_of_births.R
├── test-r_email_addresses.R
├── test-r_full_names.R
├── test-r_ip_addresses.R
├── test-r_latitudes.R
├── test-r_longitudes.R
├── test-r_national_identification_numbers.R
└── test-r_phone_numbers.R
/.Rbuildignore:
--------------------------------------------------------------------------------
1 | ^.*\.Rproj$
2 | ^\.Rproj\.user$
3 | ^\.travis\.yml$
4 | ^appveyor\.yml$
5 | ^NEWS\.md$
6 | ^cran-comments\.md$
7 | ^README\.Rmd$
8 | ^\./docs$
9 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .Rproj.user
2 | .Rhistory
3 | .RData
4 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: r
2 |
3 | # Be strict when checking our package
4 | warnings_are_errors: true
5 |
6 | # Sudo is required
7 | sudo: required
8 |
9 | # System dependencies for HTTP calling
10 | apt_packages:
11 | - libcurl4-openssl-dev
12 | - libxml2-dev
13 |
14 | r_binary_packages:
15 | - testthat
16 |
17 | r_github_packages:
18 | - jimhester/covr
19 |
20 | after_success:
21 | - Rscript -e 'covr::codecov()'
22 |
--------------------------------------------------------------------------------
/DESCRIPTION:
--------------------------------------------------------------------------------
1 | Package: generator
2 | Title: Generate Data Containing Fake Personally Identifiable Information
3 | Version: 0.1.0.9000
4 | Description: Allows users to quickly and easily generate fake data containing
5 | Personally Identifiable Information (PII) through convenience functions.
6 | Authors@R: person("Paul", "Hendricks", , "paul.hendricks.2013@owu.edu", c("aut", "cre"))
7 | URL: https://github.com/paulhendricks/generator
8 | BugReports: https://github.com/paulhendricks/generator/issues
9 | Depends: R (>= 3.1.2)
10 | License: MIT + file LICENSE
11 | LazyData: true
12 | Suggests:
13 | testthat
14 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | YEAR: 2014-2015
2 | COPYRIGHT HOLDER: Paul Hendricks
3 |
--------------------------------------------------------------------------------
/NAMESPACE:
--------------------------------------------------------------------------------
1 | # Generated by roxygen2 (4.1.1): do not edit by hand
2 |
3 | export(r_credit_card_numbers)
4 | export(r_date_of_births)
5 | export(r_email_addresses)
6 | export(r_full_names)
7 | export(r_ipv4_addresses)
8 | export(r_latitudes)
9 | export(r_longitudes)
10 | export(r_national_identification_numbers)
11 | export(r_phone_numbers)
12 |
--------------------------------------------------------------------------------
/NEWS.md:
--------------------------------------------------------------------------------
1 | # generator 0.1.0.9000
2 |
3 | ## Improvements
4 |
5 | * TO BE EDITED.
6 |
7 | # generator 0.1.0
8 |
9 | ## Improvements
10 |
11 | * Updated documentation for all functions.
12 |
--------------------------------------------------------------------------------
/R/generator.R:
--------------------------------------------------------------------------------
1 | #' generator: Generate Data Containing Fake Personally Identifiable Information
2 | #'
3 | #' @docType package
4 | #' @name generator
5 | NULL
6 |
--------------------------------------------------------------------------------
/R/r_credit_card_numbers.R:
--------------------------------------------------------------------------------
1 | #' Generate random fake credit card numbers.
2 | #'
3 | #' @param n number of observations.
4 | #' @return A character vector of \code{n} randomly generated credit card numbers.
5 | #' @examples
6 | #' r_credit_card_numbers(10)
7 | #' @export
8 | r_credit_card_numbers <- function(n) {
9 | return(paste(sample(1000:9999, size = n, replace = TRUE),
10 | sample(1000:9999, size = n, replace = TRUE),
11 | sample(1000:9999, size = n, replace = TRUE),
12 | sample(1000:9999, size = n, replace = TRUE), sep = "-"))
13 | }
14 |
--------------------------------------------------------------------------------
/R/r_date_of_births.R:
--------------------------------------------------------------------------------
1 | #' Generate random fake date of birth values.
2 | #'
3 | #' @param n number of observations.
4 | #' @param start starting date.
5 | #' @param end ending date.
6 | #' @return A character vector of \code{n} randomly generated date of birth values.
7 | #' @examples
8 | #' r_date_of_births(10)
9 | #' r_date_of_births(10, start = as.Date("2000-01-01"))
10 | #' r_date_of_births(10,
11 | #' start = as.Date("2000-01-01"),
12 | #' end = as.Date("2100-01-01"))
13 | #' @export
14 | r_date_of_births <- function(n, start = as.Date("1900-01-01"), end = Sys.Date()) {
15 | as.Date(sample.int(end - start, size = n), origin = start)
16 | }
17 |
--------------------------------------------------------------------------------
/R/r_email_addresses.R:
--------------------------------------------------------------------------------
1 | #' Generate random fake e-mail addresses.
2 | #'
3 | #' @param n number of observations.
4 | #' @return A character vector of \code{n} fake randomly generated e-mail addresses.
5 | #' @examples
6 | #' r_email_addresses(10)
7 | #' @export
8 | r_email_addresses <- function(n) {
9 | build_email_address <- function() {
10 | first_length <- sample(1:10, size = 1)
11 | second_length <- sample(1:10, size = 1)
12 | third_length <- 3
13 | first_part <- paste0(sample(letters, size = first_length), collapse = "")
14 | second_part <- paste0(sample(letters, size = second_length), collapse = "")
15 | third_part <- paste0(sample(letters, size = third_length), collapse = "")
16 | return(paste0(first_part, "@", second_part, ".", third_part))
17 | }
18 | return(replicate(n, build_email_address()))
19 | }
20 |
--------------------------------------------------------------------------------
/R/r_full_names.R:
--------------------------------------------------------------------------------
1 | #' Generate random fake full names.
2 | #'
3 | #' @param n number of observations.
4 | #' @return A character vector of \code{n} fake randomly generated full names.
5 | #' @examples
6 | #' r_full_names(10)
7 | #' @export
8 | r_full_names <- function(n) {
9 | genders <- sample(c("male", "female"), size = n, replace = TRUE)
10 | genders[genders == "male"] <- male_names[sample(1:nrow(male_names), size = sum(genders == "male"), replace = TRUE), ]
11 | genders[genders == "female"] <- female_names[sample(1:nrow(female_names), size = sum(genders == "female"), replace = TRUE), ]
12 | return(paste(genders, surnames[sample(1:nrow(surnames), size = n, replace = TRUE), "surname"], sep = " "))
13 | }
14 |
--------------------------------------------------------------------------------
/R/r_ip_addresses.R:
--------------------------------------------------------------------------------
1 | #' Generate random fake IPv4 address numbers.
2 | #'
3 | #' @param n number of observations.
4 | #' @return A character vector of \code{n} randomly generated IP address numbers.
5 | #' @examples
6 | #' r_ipv4_addresses(10)
7 | #' @export
8 | r_ipv4_addresses <- function(n) {
9 | return(paste0(sample(1:255, size = n, replace = TRUE), ".",
10 | sample(1:255, size = n, replace = TRUE), ".",
11 | sample(1:255, size = n, replace = TRUE), ".",
12 | sample(1:255, size = n, replace = TRUE), sep = ""))
13 | }
14 |
--------------------------------------------------------------------------------
/R/r_latitudes.R:
--------------------------------------------------------------------------------
1 | #' Generate random fake latitude values.
2 | #'
3 | #' @param n number of observations.
4 | #' @return A character vector of \code{n} randomly generated latitude values.
5 | #' @examples
6 | #' r_latitudes(10)
7 | #' @export
8 | r_latitudes <- function(n) {
9 | stats::runif(n, -90, 90)
10 | }
11 |
--------------------------------------------------------------------------------
/R/r_longitudes.R:
--------------------------------------------------------------------------------
1 | #' Generate random fake longitude values.
2 | #'
3 | #' @param n number of observations.
4 | #' @return A character vector of \code{n} randomly generated longitude values.
5 | #' @examples
6 | #' r_longitudes(10)
7 | #' @export
8 | r_longitudes <- function(n) {
9 | stats::runif(n, -180, 180)
10 | }
11 |
--------------------------------------------------------------------------------
/R/r_national_identification_numbers.R:
--------------------------------------------------------------------------------
1 | #' Generate random fake national identification numbers.
2 | #'
3 | #' @param n number of observations.
4 | #' @return A character vector of \code{n} randomly generated national identification numbers.
5 | #' @examples
6 | #' r_national_identification_numbers(10)
7 | #' @export
8 | r_national_identification_numbers <- function(n) {
9 | return(paste(sample(100:999, size = n, replace = TRUE),
10 | sample(10:99, size = n, replace = TRUE),
11 | sample(1000:9999, size = n, replace = TRUE), sep = "-"))
12 | }
13 |
--------------------------------------------------------------------------------
/R/r_phone_numbers.R:
--------------------------------------------------------------------------------
1 | #' Generate random fake phone numbers.
2 | #'
3 | #' @param n number of observations.
4 | #' @param use_hyphens should hyphens be included.
5 | #' @param use_parentheses should parantheses be included.
6 | #' @param use_spaces should spaces be included.
7 | #' @return A character vector of \code{n} randomly generated phone numbers.
8 | #' @examples
9 | #' r_phone_numbers(10)
10 | #' r_phone_numbers(10, use_hyphens = TRUE)
11 | #' r_phone_numbers(10, use_parentheses = TRUE)
12 | #' r_phone_numbers(10, use_spaces = TRUE)
13 | #' r_phone_numbers(10, use_parentheses = TRUE, use_hyphens = TRUE)
14 | #' r_phone_numbers(10, use_parentheses = TRUE, use_spaces = TRUE)
15 | #' @export
16 | r_phone_numbers <- function(n, use_hyphens = FALSE, use_parentheses = FALSE, use_spaces = FALSE) {
17 | left_paren <- ""
18 | right_paren <- ""
19 | if(use_parentheses) {
20 | left_paren <- "("
21 | right_paren <- ")"
22 | }
23 | hyphen <- ""
24 | if(use_hyphens) hyphen <- "-"
25 | space <- ""
26 | if(use_spaces) space <- " "
27 | build_phone_number <- function(l, r, h, s) {
28 | paste0(l, paste0(sample(1:9, size = 3), collapse = ""), r, h, s,
29 | paste0(sample(1:9, size = 3), collapse = ""), h, s,
30 | paste0(sample(1:9, size = 4), collapse = ""),
31 | collapse = "")
32 | }
33 |
34 |
35 | return(replicate(n, build_phone_number(l = left_paren,
36 | r = right_paren,
37 | h = hyphen,
38 | s = space)))
39 | }
40 |
--------------------------------------------------------------------------------
/R/sysdata.rda:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/paulhendricks/generator/ab55ef3efa2dc99ffced5a5597a745f4ad79c055/R/sysdata.rda
--------------------------------------------------------------------------------
/README.Rmd:
--------------------------------------------------------------------------------
1 | ---
2 | output:
3 | github_document
4 | ---
5 |
6 |
7 |
8 | ```{r, echo = FALSE}
9 | knitr::opts_chunk$set(
10 | collapse = TRUE,
11 | comment = "#>",
12 | fig.path = "README-"
13 | )
14 | ```
15 |
16 | # generator
17 |
18 | [](http://cran.r-project.org/package=generator)
19 | [](http://cran.rstudio.com/package=generator)
20 | [](https://travis-ci.org/paulhendricks/generator)
21 | [](https://ci.appveyor.com/project/paulhendricks/generator/branch/master)
22 | [](http://codecov.io/github/paulhendricks/generator?branch=master)
23 | [](http://www.repostatus.org/#active)
24 |
25 | `generator` generates data containing fake [Personally Identifiable Information](https://en.wikipedia.org/wiki/Personally_identifiable_information) (PII). Once complete, `generator` will be able to generate the following types of PII:
26 |
27 | * Full name
28 | * Home address
29 | * E-mail address
30 | * National identification number
31 | * Passport number
32 | * IP address
33 | * Vehicle registration plate number
34 | * Driver's license number
35 | * Credit card number
36 | * Date of birth
37 | * Birthplace
38 | * Telephone number
39 | * Latitude and longtiude
40 |
41 | ## State of the Union
42 |
43 | ### Complete!
44 |
45 | * Full name
46 | * E-mail address
47 | * Date of birth
48 | * Telephone number
49 | * Latitude and longtiude
50 |
51 | ### Needs more work...
52 |
53 | * National identification number
54 | * IP address
55 | * Credit card number
56 |
57 |
58 | ### Haven't even started :(
59 |
60 | * Home address
61 | * Vehicle registration plate number
62 | * Driver's license number
63 | * Birthplace
64 |
65 | ## Installation
66 |
67 | You can install the latest development version from CRAN:
68 |
69 | ```R
70 | install.packages("generator")
71 | ````
72 |
73 | Or from GitHub with:
74 |
75 | ```R
76 | if (packageVersion("devtools") < 1.6) {
77 | install.packages("devtools")
78 | }
79 | devtools::install_github("paulhendricks/generator")
80 | ```
81 |
82 | If you encounter a clear bug, please file a [minimal reproducible example](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) on [GitHub](https://github.com/paulhendricks/generator/issues).
83 |
84 | ## API
85 |
86 | ### Generate data containing fake PII
87 |
88 | ```{r}
89 | library(generator)
90 | n <- 6
91 | set.seed(1)
92 | ashley_madison <-
93 | data.frame(name = r_full_names(n),
94 | snn = r_national_identification_numbers(n),
95 | dob = r_date_of_births(n),
96 | email = r_email_addresses(n),
97 | ip = r_ipv4_addresses(n),
98 | phone = r_phone_numbers(n),
99 | credit_card = r_credit_card_numbers(n),
100 | lat = r_latitudes(n),
101 | lon = r_longitudes(n),
102 | stringsAsFactors = FALSE)
103 | knitr::kable(ashley_madison, format = "markdown")
104 | ```
105 |
106 | ## Citation
107 |
108 | To cite package ‘generator’ in publications use:
109 |
110 | ```
111 | Paul Hendricks (2015). generator: Generate Data Containing Fake Personally Identifiable Information. R package version 0.1.0. https://CRAN.R-project.org/package=generator
112 | ```
113 |
114 | A BibTeX entry for LaTeX users is
115 |
116 | ```
117 | @Manual{,
118 | title = {generator: Generate Data Containing Fake Personally Identifiable
119 | Information},
120 | author = {Paul Hendricks},
121 | year = {2015},
122 | note = {R package version 0.1.0},
123 | url = {https://CRAN.R-project.org/package=generator},
124 | }
125 | ```
126 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | generator
4 | =========
5 |
6 | [](http://cran.r-project.org/package=generator) [](http://cran.rstudio.com/package=generator) [](https://travis-ci.org/paulhendricks/generator) [](https://ci.appveyor.com/project/paulhendricks/generator/branch/master) [](http://codecov.io/github/paulhendricks/generator?branch=master) [](http://www.repostatus.org/#active)
7 |
8 | `generator` generates data containing fake [Personally Identifiable Information](https://en.wikipedia.org/wiki/Personally_identifiable_information) (PII). Once complete, `generator` will be able to generate the following types of PII:
9 |
10 | - Full name
11 | - Home address
12 | - E-mail address
13 | - National identification number
14 | - Passport number
15 | - IP address
16 | - Vehicle registration plate number
17 | - Driver's license number
18 | - Credit card number
19 | - Date of birth
20 | - Birthplace
21 | - Telephone number
22 | - Latitude and longtiude
23 |
24 | State of the Union
25 | ------------------
26 |
27 | ### Complete!
28 |
29 | - Full name
30 | - E-mail address
31 | - Date of birth
32 | - Telephone number
33 | - Latitude and longtiude
34 |
35 | ### Needs more work...
36 |
37 | - National identification number
38 | - IP address
39 | - Credit card number
40 |
41 | ### Haven't even started :(
42 |
43 | - Home address
44 | - Vehicle registration plate number
45 | - Driver's license number
46 | - Birthplace
47 |
48 | Installation
49 | ------------
50 |
51 | You can install the latest development version from CRAN:
52 |
53 | ``` r
54 | install.packages("generator")
55 | ```
56 |
57 | Or from GitHub with:
58 |
59 | ``` r
60 | if (packageVersion("devtools") < 1.6) {
61 | install.packages("devtools")
62 | }
63 | devtools::install_github("paulhendricks/generator")
64 | ```
65 |
66 | If you encounter a clear bug, please file a [minimal reproducible example](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) on [GitHub](https://github.com/paulhendricks/generator/issues).
67 |
68 | API
69 | ---
70 |
71 | ### Generate data containing fake PII
72 |
73 | ``` r
74 | library(generator)
75 | n <- 6
76 | set.seed(1)
77 | ashley_madison <-
78 | data.frame(name = r_full_names(n),
79 | snn = r_national_identification_numbers(n),
80 | dob = r_date_of_births(n),
81 | email = r_email_addresses(n),
82 | ip = r_ipv4_addresses(n),
83 | phone = r_phone_numbers(n),
84 | credit_card = r_credit_card_numbers(n),
85 | lat = r_latitudes(n),
86 | lon = r_longitudes(n),
87 | stringsAsFactors = FALSE)
88 | knitr::kable(ashley_madison, format = "markdown")
89 | ```
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
115 |
116 |
117 |
118 | Eldridge Pfannerstill
119 | 442-34-5338
120 | 1993-04-28
121 | ntakqojv@lgbcyk.rkv
122 | 45.84.71.225
123 | 6794976958
124 | 4125-7204-9193-5140
125 | -2.7018575
126 | 8.634988
127 |
128 |
129 | Augustine Homenick
130 | 799-44-6396
131 | 1912-09-08
132 | iqg@mtcuh.viy
133 | 191.116.55.106
134 | 3275827694
135 | 2182-5994-2283-9486
136 | -70.4148630
137 | -65.827918
138 |
139 |
140 | Jennie Runte
141 | 941-11-5441
142 | 1985-01-12
143 | wjszy@sjhreocvt.gbp
144 | 27.128.73.17
145 | 7419351735
146 | 4370-4866-4735-7857
147 | -45.4091701
148 | -79.932229
149 |
150 |
151 | Araceli Kunde
152 | 290-44-2675
153 | 1948-04-28
154 | uljsnvhfr@qfdkumtn.jkd
155 | 221.47.229.86
156 | 3243246285
157 | 6682-5074-2898-9396
158 | -0.2673845
159 | 103.514583
160 |
161 |
162 | Josue Rau
163 | 686-88-8446
164 | 1996-06-14
165 | c@lqxzkdpi.nfy
166 | 157.136.114.185
167 | 9169736873
168 | 4510-3757-4858-5236
169 | -22.8839925
170 | 72.886505
171 |
172 |
173 | Elnora Zemlak
174 | 212-40-7016
175 | 1976-01-09
176 | capvnl@nympzf.gsk
177 | 143.20.199.87
178 | 3295843196
179 | 7206-6205-2194-6432
180 | 78.2444466
181 | -120.590050
182 |
183 |
184 |
185 |
186 | Citation
187 | --------
188 |
189 | To cite package ‘generator’ in publications use:
190 |
191 | Paul Hendricks (2015). generator: Generate Data Containing Fake Personally Identifiable Information. R package version 0.1.0. https://CRAN.R-project.org/package=generator
192 |
193 | A BibTeX entry for LaTeX users is
194 |
195 | @Manual{,
196 | title = {generator: Generate Data Containing Fake Personally Identifiable
197 | Information},
198 | author = {Paul Hendricks},
199 | year = {2015},
200 | note = {R package version 0.1.0},
201 | url = {https://CRAN.R-project.org/package=generator},
202 | }
203 |
--------------------------------------------------------------------------------
/appveyor.yml:
--------------------------------------------------------------------------------
1 | # DO NOT CHANGE the "init" and "install" sections below
2 |
3 | # Download script file from GitHub
4 | init:
5 | ps: |
6 | $ErrorActionPreference = "Stop"
7 | Invoke-WebRequest http://raw.github.com/krlmlr/r-appveyor/master/scripts/appveyor-tool.ps1 -OutFile "..\appveyor-tool.ps1"
8 | Import-Module '..\appveyor-tool.ps1'
9 | install:
10 | ps: Bootstrap
11 |
12 | # Adapt as necessary starting from here
13 |
14 | build_script:
15 | - travis-tool.sh install_deps
16 |
17 | test_script:
18 | - travis-tool.sh run_tests
19 |
20 | on_failure:
21 | - travis-tool.sh dump_logs
22 |
23 | artifacts:
24 | - path: '*.Rcheck\**\*.log'
25 | name: Logs
26 |
27 | - path: '*.Rcheck\**\*.out'
28 | name: Logs
29 |
30 | - path: '*.Rcheck\**\*.fail'
31 | name: Logs
32 |
33 | - path: '*.Rcheck\**\*.Rout'
34 | name: Logs
35 |
36 | - path: '\*_*.tar.gz'
37 | name: Bits
38 |
39 | - path: '\*_*.zip'
40 | name: Bits
41 |
--------------------------------------------------------------------------------
/cran-comments.md:
--------------------------------------------------------------------------------
1 | ## Test environments
2 | * local OS X install, R 3.1.2
3 | * ubuntu 12.04 (on travis-ci), R 3.1.2
4 | * win-builder (devel and release)
5 |
6 | ## R CMD check results
7 | There were no ERRORs, WARNINGs, or NOTEs.
8 |
--------------------------------------------------------------------------------
/docs/LICENSE.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | License • generator
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
82 |
83 |
84 |
85 |
88 |
89 |
YEAR: 2014-2015
90 | COPYRIGHT HOLDER: Paul Hendricks
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
108 |
109 |
110 |
111 |
112 |
--------------------------------------------------------------------------------
/docs/authors.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | Authors • generator
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
82 |
83 |
99 |
100 |
101 |
111 |
112 |
113 |
114 |
115 |
--------------------------------------------------------------------------------
/docs/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Generate Data Containing Fake Personally Identifiable Information • generator
9 |
10 |
11 |
12 |
16 |
17 |
18 |
19 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
71 |
72 |
generator
generates data containing fake Personally Identifiable Information (PII). Once complete, generator
will be able to generate the following types of PII:
73 |
74 | Full name
75 | Home address
76 | E-mail address
77 | National identification number
78 | Passport number
79 | IP address
80 | Vehicle registration plate number
81 | Driver’s license number
82 | Credit card number
83 | Date of birth
84 | Birthplace
85 | Telephone number
86 | Latitude and longtiude
87 |
88 |
89 |
90 | State of the Union
91 |
92 |
93 | Complete!
94 |
95 | Full name
96 | E-mail address
97 | Date of birth
98 | Telephone number
99 | Latitude and longtiude
100 |
101 |
102 |
103 |
104 | Needs more work…
105 |
106 | National identification number
107 | IP address
108 | Credit card number
109 |
110 |
111 |
112 |
113 | Haven’t even started :(
114 |
115 | Home address
116 | Vehicle registration plate number
117 | Driver’s license number
118 | Birthplace
119 |
120 |
121 |
122 |
123 |
124 | Installation
125 |
You can install the latest development version from CRAN:
126 |
install.packages ("generator" )
127 |
Or from GitHub with:
128 |
if (packageVersion ("devtools" ) < 1.6 ) {
129 | install.packages ("devtools" )
130 | }
131 | devtools::install_github ("paulhendricks/generator" )
132 |
If you encounter a clear bug, please file a minimal reproducible example on GitHub .
133 |
134 |
135 |
136 | API
137 |
138 |
139 | Generate data containing fake PII
140 |
library (generator)
141 | n <- 6
142 | set.seed (1 )
143 | ashley_madison <-
144 | data.frame (name = r_full_names (n),
145 | snn = r_national_identification_numbers (n),
146 | dob = r_date_of_births (n),
147 | email = r_email_addresses (n),
148 | ip = r_ipv4_addresses (n),
149 | phone = r_phone_numbers (n),
150 | credit_card = r_credit_card_numbers (n),
151 | lat = r_latitudes (n),
152 | lon = r_longitudes (n),
153 | stringsAsFactors = FALSE )
154 | knitr::kable (ashley_madison, format = "markdown" )
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
178 |
179 |
180 | Eldridge Pfannerstill
181 | 442-34-5338
182 | 1993-04-28
183 | ntakqojv@lgbcyk.rkv
184 | 45.84.71.225
185 | 6794976958
186 | 4125-7204-9193-5140
187 | -2.7018575
188 | 8.634988
189 |
190 |
191 | Augustine Homenick
192 | 799-44-6396
193 | 1912-09-08
194 | iqg@mtcuh.viy
195 | 191.116.55.106
196 | 3275827694
197 | 2182-5994-2283-9486
198 | -70.4148630
199 | -65.827918
200 |
201 |
202 | Jennie Runte
203 | 941-11-5441
204 | 1985-01-12
205 | wjszy@sjhreocvt.gbp
206 | 27.128.73.17
207 | 7419351735
208 | 4370-4866-4735-7857
209 | -45.4091701
210 | -79.932229
211 |
212 |
213 | Araceli Kunde
214 | 290-44-2675
215 | 1948-04-28
216 | uljsnvhfr@qfdkumtn.jkd
217 | 221.47.229.86
218 | 3243246285
219 | 6682-5074-2898-9396
220 | -0.2673845
221 | 103.514583
222 |
223 |
224 | Josue Rau
225 | 686-88-8446
226 | 1996-06-14
227 | c@lqxzkdpi.nfy
228 | 157.136.114.185
229 | 9169736873
230 | 4510-3757-4858-5236
231 | -22.8839925
232 | 72.886505
233 |
234 |
235 | Elnora Zemlak
236 | 212-40-7016
237 | 1976-01-09
238 | capvnl@nympzf.gsk
239 | 143.20.199.87
240 | 3295843196
241 | 7206-6205-2194-6432
242 | 78.2444466
243 | -120.590050
244 |
245 |
246 |
247 |
248 |
249 |
250 |
251 | Citation
252 |
To cite package ‘generator’ in publications use:
253 |
Paul Hendricks (2015). generator: Generate Data Containing Fake Personally Identifiable Information. R package version 0.1.0. https://CRAN.R-project.org/package=generator
254 |
A BibTeX entry for LaTeX users is
255 |
@Manual{,
256 | title = {generator: Generate Data Containing Fake Personally Identifiable
257 | Information},
258 | author = {Paul Hendricks},
259 | year = {2015},
260 | note = {R package version 0.1.0},
261 | url = {https://CRAN.R-project.org/package=generator},
262 | }
263 |
264 |
265 |
266 |
267 |
268 |
295 |
296 |
297 |
298 |
299 |
308 |
309 |
310 |
311 |
312 |
--------------------------------------------------------------------------------
/docs/jquery.sticky-kit.min.js:
--------------------------------------------------------------------------------
1 | /*
2 | Sticky-kit v1.1.2 | WTFPL | Leaf Corcoran 2015 | http://leafo.net
3 | */
4 | (function(){var b,f;b=this.jQuery||window.jQuery;f=b(window);b.fn.stick_in_parent=function(d){var A,w,J,n,B,K,p,q,k,E,t;null==d&&(d={});t=d.sticky_class;B=d.inner_scrolling;E=d.recalc_every;k=d.parent;q=d.offset_top;p=d.spacer;w=d.bottoming;null==q&&(q=0);null==k&&(k=void 0);null==B&&(B=!0);null==t&&(t="is_stuck");A=b(document);null==w&&(w=!0);J=function(a,d,n,C,F,u,r,G){var v,H,m,D,I,c,g,x,y,z,h,l;if(!a.data("sticky_kit")){a.data("sticky_kit",!0);I=A.height();g=a.parent();null!=k&&(g=g.closest(k));
5 | if(!g.length)throw"failed to find stick parent";v=m=!1;(h=null!=p?p&&a.closest(p):b("
"))&&h.css("position",a.css("position"));x=function(){var c,f,e;if(!G&&(I=A.height(),c=parseInt(g.css("border-top-width"),10),f=parseInt(g.css("padding-top"),10),d=parseInt(g.css("padding-bottom"),10),n=g.offset().top+c+f,C=g.height(),m&&(v=m=!1,null==p&&(a.insertAfter(h),h.detach()),a.css({position:"",top:"",width:"",bottom:""}).removeClass(t),e=!0),F=a.offset().top-(parseInt(a.css("margin-top"),10)||0)-q,
6 | u=a.outerHeight(!0),r=a.css("float"),h&&h.css({width:a.outerWidth(!0),height:u,display:a.css("display"),"vertical-align":a.css("vertical-align"),"float":r}),e))return l()};x();if(u!==C)return D=void 0,c=q,z=E,l=function(){var b,l,e,k;if(!G&&(e=!1,null!=z&&(--z,0>=z&&(z=E,x(),e=!0)),e||A.height()===I||x(),e=f.scrollTop(),null!=D&&(l=e-D),D=e,m?(w&&(k=e+u+c>C+n,v&&!k&&(v=!1,a.css({position:"fixed",bottom:"",top:c}).trigger("sticky_kit:unbottom"))),eb&&!v&&(c-=l,c=Math.max(b-u,c),c=Math.min(q,c),m&&a.css({top:c+"px"})))):e>F&&(m=!0,b={position:"fixed",top:c},b.width="border-box"===a.css("box-sizing")?a.outerWidth()+"px":a.width()+"px",a.css(b).addClass(t),null==p&&(a.after(h),"left"!==r&&"right"!==r||h.append(a)),a.trigger("sticky_kit:stick")),m&&w&&(null==k&&(k=e+u+c>C+n),!v&&k)))return v=!0,"static"===g.css("position")&&g.css({position:"relative"}),
8 | a.css({position:"absolute",bottom:d,top:"auto"}).trigger("sticky_kit:bottom")},y=function(){x();return l()},H=function(){G=!0;f.off("touchmove",l);f.off("scroll",l);f.off("resize",y);b(document.body).off("sticky_kit:recalc",y);a.off("sticky_kit:detach",H);a.removeData("sticky_kit");a.css({position:"",bottom:"",top:"",width:""});g.position("position","");if(m)return null==p&&("left"!==r&&"right"!==r||a.insertAfter(h),h.remove()),a.removeClass(t)},f.on("touchmove",l),f.on("scroll",l),f.on("resize",
9 | y),b(document.body).on("sticky_kit:recalc",y),a.on("sticky_kit:detach",H),setTimeout(l,0)}};n=0;for(K=this.length;n
2 |
3 |
5 |
8 |
12 |
13 |
--------------------------------------------------------------------------------
/docs/news/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | All news • generator
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
82 |
83 |
84 |
85 |
86 |
89 |
90 |
91 |
92 |
93 | generator 0.1.0.9000
94 |
95 |
96 | Improvements
97 |
100 |
101 |
102 |
103 |
104 | generator 0.1.0
105 |
106 |
107 | Improvements
108 |
109 | Updated documentation for all functions.
110 |
111 |
112 |
113 |
114 |
115 |
116 |
125 |
126 |
127 |
128 |
138 |
139 |
140 |
141 |
142 |
--------------------------------------------------------------------------------
/docs/pkgdown.css:
--------------------------------------------------------------------------------
1 | /* Sticker footer */
2 | body > .container {
3 | display: flex;
4 | padding-top: 60px;
5 | min-height: calc(100vh);
6 | flex-direction: column;
7 | }
8 |
9 | body > .container .row {
10 | flex: 1;
11 | }
12 |
13 | footer {
14 | margin-top: 45px;
15 | padding: 35px 0 36px;
16 | border-top: 1px solid #e5e5e5;
17 | color: #666;
18 | display: flex;
19 | }
20 | footer p {
21 | margin-bottom: 0;
22 | }
23 | footer div {
24 | flex: 1;
25 | }
26 | footer .pkgdown {
27 | text-align: right;
28 | }
29 | footer p {
30 | margin-bottom: 0;
31 | }
32 |
33 | img.icon {
34 | float: right;
35 | }
36 |
37 | img {
38 | max-width: 100%;
39 | }
40 |
41 | /* Section anchors ---------------------------------*/
42 |
43 | a.anchor {
44 | margin-left: -30px;
45 | display:inline-block;
46 | width: 30px;
47 | height: 30px;
48 | visibility: hidden;
49 |
50 | background-image: url(./link.svg);
51 | background-repeat: no-repeat;
52 | background-size: 20px 20px;
53 | background-position: center center;
54 | }
55 |
56 | .hasAnchor:hover a.anchor {
57 | visibility: visible;
58 | }
59 |
60 | @media (max-width: 767px) {
61 | .hasAnchor:hover a.anchor {
62 | visibility: hidden;
63 | }
64 | }
65 |
66 |
67 | /* Fixes for fixed navbar --------------------------*/
68 |
69 | .contents h1, .contents h2, .contents h3, .contents h4 {
70 | padding-top: 60px;
71 | margin-top: -60px;
72 | }
73 |
74 | /* Static header placement on mobile devices */
75 | @media (max-width: 767px) {
76 | .navbar-fixed-top {
77 | position: absolute;
78 | }
79 | .navbar {
80 | padding: 0;
81 | }
82 | }
83 |
84 |
85 | /* Sidebar --------------------------*/
86 |
87 | #sidebar {
88 | margin-top: 30px;
89 | }
90 | #sidebar h2 {
91 | font-size: 1.5em;
92 | margin-top: 1em;
93 | }
94 |
95 | #sidebar h2:first-child {
96 | margin-top: 0;
97 | }
98 |
99 | #sidebar .list-unstyled li {
100 | margin-bottom: 0.5em;
101 | }
102 |
103 | /* Reference index & topics ----------------------------------------------- */
104 |
105 | .ref-index th {font-weight: normal;}
106 | .ref-index h2 {font-size: 20px;}
107 |
108 | .ref-index td {vertical-align: top;}
109 | .ref-index .alias {width: 40%;}
110 | .ref-index .title {width: 60%;}
111 |
112 | .ref-index .alias {width: 40%;}
113 | .ref-index .title {width: 60%;}
114 |
115 | .ref-arguments th {text-align: right; padding-right: 10px;}
116 | .ref-arguments th, .ref-arguments td {vertical-align: top;}
117 | .ref-arguments .name {width: 20%;}
118 | .ref-arguments .desc {width: 80%;}
119 |
120 | /* Nice scrolling for wide elements --------------------------------------- */
121 |
122 | table {
123 | display: block;
124 | overflow: auto;
125 | }
126 |
127 | /* Syntax highlighting ---------------------------------------------------- */
128 |
129 | pre {
130 | word-wrap: normal;
131 | word-break: normal;
132 | border: 1px solid #eee;
133 | }
134 |
135 | pre, code {
136 | background-color: #f8f8f8;
137 | color: #333;
138 | }
139 |
140 | pre .img {
141 | margin: 5px 0;
142 | }
143 |
144 | pre .img img {
145 | background-color: #fff;
146 | display: block;
147 | height: auto;
148 | }
149 |
150 | code a, pre a {
151 | color: #375f84;
152 | }
153 |
154 | .fl {color: #1514b5;}
155 | .fu {color: #000000;} /* function */
156 | .ch,.st {color: #036a07;} /* string */
157 | .kw {color: #264D66;} /* keyword */
158 | .co {color: #888888;} /* comment */
159 |
160 | .message { color: black; font-weight: bolder;}
161 | .error { color: orange; font-weight: bolder;}
162 | .warning { color: #6A0366; font-weight: bolder;}
163 |
164 |
--------------------------------------------------------------------------------
/docs/pkgdown.js:
--------------------------------------------------------------------------------
1 | $(function() {
2 | $("#sidebar").stick_in_parent({offset_top: 40});
3 | $('body').scrollspy({
4 | target: '#sidebar',
5 | offset: 60
6 | });
7 |
8 | var cur_path = paths(location.pathname);
9 | $("#navbar ul li a").each(function(index, value) {
10 | if (value.text == "Home")
11 | return;
12 | if (value.getAttribute("href") === "#")
13 | return;
14 |
15 | var path = paths(value.pathname);
16 | if (is_prefix(cur_path, path)) {
17 | // Add class to parent , and enclosing if in dropdown
18 | var menu_anchor = $(value);
19 | menu_anchor.parent().addClass("active");
20 | menu_anchor.closest("li.dropdown").addClass("active");
21 | }
22 | });
23 | });
24 |
25 | function paths(pathname) {
26 | var pieces = pathname.split("/");
27 | pieces.shift(); // always starts with /
28 |
29 | var end = pieces[pieces.length - 1];
30 | if (end === "index.html" || end === "")
31 | pieces.pop();
32 | return(pieces);
33 | }
34 |
35 | function is_prefix(needle, haystack) {
36 | if (needle.length > haystack.lengh)
37 | return(false);
38 |
39 | for (var i = 0; i < haystack.length; i++) {
40 | if (needle[i] != haystack[i])
41 | return(false);
42 | }
43 |
44 | return(true);
45 | }
46 |
--------------------------------------------------------------------------------
/docs/reference/generator.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | generator: Generate Data Containing Fake Personally Identifiable Information — generator • generator
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
82 |
83 |
84 |
85 |
88 |
89 |
90 |
generator: Generate Data Containing Fake Personally Identifiable Information
91 |
92 |
93 |
94 |
95 |
96 |
102 |
103 |
104 |
114 |
115 |
116 |
117 |
118 |
--------------------------------------------------------------------------------
/docs/reference/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | Function reference • generator
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
82 |
83 |
84 |
85 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 | All functions
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 | generator: Generate Data Containing Fake Personally Identifiable Information
113 |
114 |
115 |
116 | r_credit_card_numbers
117 |
118 | Generate random fake credit card numbers.
119 |
120 |
121 |
122 | r_date_of_births
123 |
124 | Generate random fake date of birth values.
125 |
126 |
127 |
128 | r_email_addresses
129 |
130 | Generate random fake e-mail addresses.
131 |
132 |
133 |
134 | r_full_names
135 |
136 | Generate random fake full names.
137 |
138 |
139 |
140 | r_ipv4_addresses
141 |
142 | Generate random fake IPv4 address numbers.
143 |
144 |
145 |
146 | r_latitudes
147 |
148 | Generate random fake latitude values.
149 |
150 |
151 |
152 | r_longitudes
153 |
154 | Generate random fake longitude values.
155 |
156 |
157 |
158 | r_national_identification_numbers
159 |
160 | Generate random fake national identification numbers.
161 |
162 |
163 |
164 | r_phone_numbers
165 |
166 | Generate random fake phone numbers.
167 |
168 |
169 |
170 |
171 |
172 |
173 |
179 |
180 |
181 |
191 |
192 |
193 |
194 |
195 |
--------------------------------------------------------------------------------
/docs/reference/r_credit_card_numbers.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | Generate random fake credit card numbers. — r_credit_card_numbers • generator
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
82 |
83 |
84 |
85 |
88 |
89 |
90 |
Generate random fake credit card numbers.
91 |
92 |
93 |
r_credit_card_numbers (n )
94 |
95 |
Arguments
96 |
97 |
98 |
99 | n
100 | number of observations.
101 |
102 |
103 |
104 |
Value
105 |
106 |
A character vector of n
randomly generated credit card numbers.
107 |
108 |
109 |
Examples
110 |
r_credit_card_numbers (10 )
#> [1] "1726-8871-3609-1281" "8508-2574-7105-3030" "6406-1308-7617-3707"
111 | #> [4] "2414-3883-2763-6728" "1066-4620-9824-5311" "5197-2761-7673-4889"
112 | #> [7] "5479-4631-1463-7357" "3607-1572-5771-9537" "7595-4498-7262-2623"
113 | #> [10] "7952-9779-7197-2952"
114 |
115 |
126 |
127 |
128 |
138 |
139 |
140 |
141 |
142 |
--------------------------------------------------------------------------------
/docs/reference/r_date_of_births.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | Generate random fake date of birth values. — r_date_of_births • generator
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
82 |
83 |
84 |
85 |
88 |
89 |
90 |
Generate random fake date of birth values.
91 |
92 |
93 |
r_date_of_births (n , start = as.Date ("1900-01-01" ), end = Sys.Date ())
94 |
95 |
Arguments
96 |
97 |
98 |
99 | n
100 | number of observations.
101 |
102 |
103 | start
104 | starting date.
105 |
106 |
107 | end
108 | ending date.
109 |
110 |
111 |
112 |
Value
113 |
114 |
A character vector of n
randomly generated date of birth values.
115 |
116 |
117 |
Examples
118 |
r_date_of_births (10 )
#> [1] "1979-12-03" "1958-08-13" "1975-05-25" "1977-07-31" "1911-04-15"
119 | #> [6] "1989-12-12" "1990-06-04" "2016-05-22" "2014-01-06" "1945-09-21"
r_date_of_births (10 , start = as.Date ("2000-01-01" ))
#> [1] "2008-01-27" "2005-07-08" "2003-01-22" "2009-04-19" "2008-08-19"
120 | #> [6] "2013-08-17" "2003-07-28" "2012-06-21" "2001-02-21" "2006-03-11"
r_date_of_births (10 ,
121 | start = as.Date ("2000-01-01" ),
122 | end = as.Date ("2100-01-01" ))
#> [1] "2082-07-10" "2027-05-20" "2057-01-01" "2033-07-28" "2059-08-16"
123 | #> [6] "2019-02-25" "2094-10-06" "2054-03-29" "2054-06-14" "2027-11-09"
124 |
125 |
136 |
137 |
138 |
148 |
149 |
150 |
151 |
152 |
--------------------------------------------------------------------------------
/docs/reference/r_email_addresses.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | Generate random fake e-mail addresses. — r_email_addresses • generator
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
82 |
83 |
84 |
85 |
88 |
89 |
90 |
Generate random fake e-mail addresses.
91 |
92 |
93 |
r_email_addresses (n )
94 |
95 |
Arguments
96 |
97 |
98 |
99 | n
100 | number of observations.
101 |
102 |
103 |
104 |
Value
105 |
106 |
A character vector of n
fake randomly generated e-mail addresses.
107 |
108 |
109 |
Examples
110 |
r_email_addresses (10 )
#> [1] "aljzi@ovjm.pgy" "kfqbv@dmuqflwain.vkf" "nqmtp@wavzlhp.pzu"
111 | #> [4] "xvfjqc@fep.wxn" "gbvyxm@ewanftq.sfr" "iog@mwxst.ptx"
112 | #> [7] "hsufatio@rki.tqc" "wclfpdtgs@x.vcz" "ziweadrx@fawz.uhv"
113 | #> [10] "psu@tkdbomngru.wyf"
114 |
115 |
126 |
127 |
128 |
138 |
139 |
140 |
141 |
142 |
--------------------------------------------------------------------------------
/docs/reference/r_full_names.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | Generate random fake full names. — r_full_names • generator
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
82 |
83 |
84 |
85 |
88 |
89 |
90 |
Generate random fake full names.
91 |
92 |
93 |
r_full_names (n )
94 |
95 |
Arguments
96 |
97 |
98 |
99 | n
100 | number of observations.
101 |
102 |
103 |
104 |
Value
105 |
106 |
A character vector of n
fake randomly generated full names.
107 |
108 |
109 |
Examples
110 |
r_full_names (10 )
#> [1] "Annalee Reinger" "Rich Nicolas" "Bert Huels"
111 | #> [4] "Yasmine Williamson" "Deeann Grimes" "Toney Beahan"
112 | #> [7] "Elisha Marvin" "Margarite Emard" "Jerilyn Casper"
113 | #> [10] "Johnie Wehner"
114 |
115 |
126 |
127 |
128 |
138 |
139 |
140 |
141 |
142 |
--------------------------------------------------------------------------------
/docs/reference/r_ipv4_addresses.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | Generate random fake IPv4 address numbers. — r_ipv4_addresses • generator
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
82 |
83 |
84 |
85 |
88 |
89 |
90 |
Generate random fake IPv4 address numbers.
91 |
92 |
93 |
r_ipv4_addresses (n )
94 |
95 |
Arguments
96 |
97 |
98 |
99 | n
100 | number of observations.
101 |
102 |
103 |
104 |
Value
105 |
106 |
A character vector of n
randomly generated IP address numbers.
107 |
108 |
109 |
Examples
110 |
r_ipv4_addresses (10 )
#> [1] "205.51.53.34" "194.248.8.24" "136.99.248.178" "140.166.46.104"
111 | #> [5] "25.208.199.17" "100.19.226.33" "44.135.214.240" "177.195.155.56"
112 | #> [9] "173.112.232.170" "242.141.10.52"
113 |
114 |
125 |
126 |
127 |
137 |
138 |
139 |
140 |
141 |
--------------------------------------------------------------------------------
/docs/reference/r_latitudes.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | Generate random fake latitude values. — r_latitudes • generator
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
82 |
83 |
84 |
85 |
88 |
89 |
90 |
Generate random fake latitude values.
91 |
92 |
93 |
r_latitudes (n )
94 |
95 |
Arguments
96 |
97 |
98 |
99 | n
100 | number of observations.
101 |
102 |
103 |
104 |
Value
105 |
106 |
A character vector of n
randomly generated latitude values.
107 |
108 |
109 |
Examples
110 |
r_latitudes (10 )
#> [1] 8.746459 58.950255 -67.039623 -42.986499 -38.084935 -87.341577
111 | #> [7] 63.670271 -15.471391 45.182492 39.422512
112 |
113 |
124 |
125 |
126 |
136 |
137 |
138 |
139 |
140 |
--------------------------------------------------------------------------------
/docs/reference/r_longitudes.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | Generate random fake longitude values. — r_longitudes • generator
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
82 |
83 |
84 |
85 |
88 |
89 |
90 |
Generate random fake longitude values.
91 |
92 |
93 |
r_longitudes (n )
94 |
95 |
Arguments
96 |
97 |
98 |
99 | n
100 | number of observations.
101 |
102 |
103 |
104 |
Value
105 |
106 |
A character vector of n
randomly generated longitude values.
107 |
108 |
109 |
Examples
110 |
r_longitudes (10 )
#> [1] 5.527908 170.941053 -50.120078 -118.657617 101.930641 -168.867397
111 | #> [7] 104.191329 -120.022676 -169.663476 102.942419
112 |
113 |
124 |
125 |
126 |
136 |
137 |
138 |
139 |
140 |
--------------------------------------------------------------------------------
/docs/reference/r_national_identification_numbers.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | Generate random fake national identification numbers. — r_national_identification_numbers • generator
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
82 |
83 |
84 |
85 |
88 |
89 |
90 |
Generate random fake national identification numbers.
91 |
92 |
93 |
r_national_identification_numbers (n )
94 |
95 |
Arguments
96 |
97 |
98 |
99 | n
100 | number of observations.
101 |
102 |
103 |
104 |
Value
105 |
106 |
A character vector of n
randomly generated national identification numbers.
107 |
108 |
109 |
Examples
110 |
r_national_identification_numbers (10 )
#> [1] "842-21-2485" "968-71-6102" "440-67-9082" "256-39-6350" "643-44-8485"
111 | #> [6] "824-73-6340" "133-72-8010" "759-93-4579" "293-51-8648" "114-63-7676"
112 |
113 |
124 |
125 |
126 |
136 |
137 |
138 |
139 |
140 |
--------------------------------------------------------------------------------
/docs/reference/r_phone_numbers.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | Generate random fake phone numbers. — r_phone_numbers • generator
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
82 |
83 |
84 |
85 |
88 |
89 |
90 |
Generate random fake phone numbers.
91 |
92 |
93 |
r_phone_numbers (n , use_hyphens = FALSE , use_parentheses = FALSE ,
94 | use_spaces = FALSE )
95 |
96 |
Arguments
97 |
98 |
99 |
100 | n
101 | number of observations.
102 |
103 |
104 | use_hyphens
105 | should hyphens be included.
106 |
107 |
108 | use_parentheses
109 | should parantheses be included.
110 |
111 |
112 | use_spaces
113 | should spaces be included.
114 |
115 |
116 |
117 |
Value
118 |
119 |
A character vector of n
randomly generated phone numbers.
120 |
121 |
122 |
Examples
123 |
r_phone_numbers (10 )
#> [1] "3188419524" "2812877891" "4673748576" "4129379142" "6974867135"
124 | #> [6] "9244921346" "2495189817" "4965177542" "7858178634" "5145982374"
r_phone_numbers (10 , use_hyphens = TRUE )
#> [1] "638-471-1352" "176-416-5324" "268-386-1426" "927-183-1678" "594-863-5281"
125 | #> [6] "381-721-9827" "643-135-9146" "124-348-2185" "952-145-6943" "184-953-5174"
r_phone_numbers (10 , use_parentheses = TRUE )
#> [1] "(956)6754368" "(285)1686972" "(215)8954195" "(452)1649715" "(126)6939438"
126 | #> [6] "(267)8926835" "(798)2851438" "(265)6156485" "(863)4296194" "(627)6529185"
r_phone_numbers (10 , use_spaces = TRUE )
#> [1] "637 269 7965" "178 647 6475" "251 592 8934" "934 213 2675" "593 647 8295"
127 | #> [6] "465 182 9573" "497 397 2739" "826 481 5961" "172 179 4895" "362 521 4872"
r_phone_numbers (10 , use_parentheses = TRUE , use_hyphens = TRUE )
#> [1] "(613)-645-9156" "(459)-259-6241" "(516)-329-6834" "(827)-125-5374"
128 | #> [5] "(167)-948-4273" "(269)-379-1987" "(789)-439-1942" "(352)-637-9164"
129 | #> [9] "(761)-479-6897" "(436)-623-1465"
r_phone_numbers (10 , use_parentheses = TRUE , use_spaces = TRUE )
#> [1] "(371) 459 8951" "(246) 583 3697" "(263) 857 1693" "(731) 135 7631"
130 | #> [5] "(172) 486 6371" "(682) 214 5816" "(523) 679 4267" "(417) 823 2386"
131 | #> [9] "(324) 184 7625" "(269) 817 1935"
132 |
133 |
144 |
145 |
146 |
156 |
157 |
158 |
159 |
160 |
--------------------------------------------------------------------------------
/generator.Rproj:
--------------------------------------------------------------------------------
1 | Version: 1.0
2 |
3 | RestoreWorkspace: No
4 | SaveWorkspace: No
5 | AlwaysSaveHistory: Default
6 |
7 | EnableCodeIndexing: Yes
8 | UseSpacesForTab: Yes
9 | NumSpacesForTab: 2
10 | Encoding: UTF-8
11 |
12 | RnwWeave: Sweave
13 | LaTeX: pdfLaTeX
14 |
15 | AutoAppendNewline: Yes
16 | StripTrailingWhitespace: Yes
17 |
18 | BuildType: Package
19 | PackageUseDevtools: Yes
20 | PackageInstallArgs: --no-multiarch --with-keep.source
21 | PackageRoxygenize: rd,collate,namespace
22 |
--------------------------------------------------------------------------------
/man/generator.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2 (4.1.1): do not edit by hand
2 | % Please edit documentation in R/generator.R
3 | \docType{package}
4 | \name{generator}
5 | \alias{generator}
6 | \alias{generator-package}
7 | \title{generator: Generate Data Containing Fake Personally Identifiable Information}
8 | \description{
9 | generator: Generate Data Containing Fake Personally Identifiable Information
10 | }
11 |
12 |
--------------------------------------------------------------------------------
/man/r_credit_card_numbers.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2 (4.1.1): do not edit by hand
2 | % Please edit documentation in R/r_credit_card_numbers.R
3 | \name{r_credit_card_numbers}
4 | \alias{r_credit_card_numbers}
5 | \title{Generate random fake credit card numbers.}
6 | \usage{
7 | r_credit_card_numbers(n)
8 | }
9 | \arguments{
10 | \item{n}{number of observations.}
11 | }
12 | \value{
13 | A character vector of \code{n} randomly generated credit card numbers.
14 | }
15 | \description{
16 | Generate random fake credit card numbers.
17 | }
18 | \examples{
19 | r_credit_card_numbers(10)
20 | }
21 |
22 |
--------------------------------------------------------------------------------
/man/r_date_of_births.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2 (4.1.1): do not edit by hand
2 | % Please edit documentation in R/r_date_of_births.R
3 | \name{r_date_of_births}
4 | \alias{r_date_of_births}
5 | \title{Generate random fake date of birth values.}
6 | \usage{
7 | r_date_of_births(n, start = as.Date("1900-01-01"), end = Sys.Date())
8 | }
9 | \arguments{
10 | \item{n}{number of observations.}
11 |
12 | \item{start}{starting date.}
13 |
14 | \item{end}{ending date.}
15 | }
16 | \value{
17 | A character vector of \code{n} randomly generated date of birth values.
18 | }
19 | \description{
20 | Generate random fake date of birth values.
21 | }
22 | \examples{
23 | r_date_of_births(10)
24 | r_date_of_births(10, start = as.Date("2000-01-01"))
25 | r_date_of_births(10,
26 | start = as.Date("2000-01-01"),
27 | end = as.Date("2100-01-01"))
28 | }
29 |
30 |
--------------------------------------------------------------------------------
/man/r_email_addresses.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2 (4.1.1): do not edit by hand
2 | % Please edit documentation in R/r_email_addresses.R
3 | \name{r_email_addresses}
4 | \alias{r_email_addresses}
5 | \title{Generate random fake e-mail addresses.}
6 | \usage{
7 | r_email_addresses(n)
8 | }
9 | \arguments{
10 | \item{n}{number of observations.}
11 | }
12 | \value{
13 | A character vector of \code{n} fake randomly generated e-mail addresses.
14 | }
15 | \description{
16 | Generate random fake e-mail addresses.
17 | }
18 | \examples{
19 | r_email_addresses(10)
20 | }
21 |
22 |
--------------------------------------------------------------------------------
/man/r_full_names.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2 (4.1.1): do not edit by hand
2 | % Please edit documentation in R/r_full_names.R
3 | \name{r_full_names}
4 | \alias{r_full_names}
5 | \title{Generate random fake full names.}
6 | \usage{
7 | r_full_names(n)
8 | }
9 | \arguments{
10 | \item{n}{number of observations.}
11 | }
12 | \value{
13 | A character vector of \code{n} fake randomly generated full names.
14 | }
15 | \description{
16 | Generate random fake full names.
17 | }
18 | \examples{
19 | r_full_names(10)
20 | }
21 |
22 |
--------------------------------------------------------------------------------
/man/r_ipv4_addresses.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2 (4.1.1): do not edit by hand
2 | % Please edit documentation in R/r_ip_addresses.R
3 | \name{r_ipv4_addresses}
4 | \alias{r_ipv4_addresses}
5 | \title{Generate random fake IPv4 address numbers.}
6 | \usage{
7 | r_ipv4_addresses(n)
8 | }
9 | \arguments{
10 | \item{n}{number of observations.}
11 | }
12 | \value{
13 | A character vector of \code{n} randomly generated IP address numbers.
14 | }
15 | \description{
16 | Generate random fake IPv4 address numbers.
17 | }
18 | \examples{
19 | r_ipv4_addresses(10)
20 | }
21 |
22 |
--------------------------------------------------------------------------------
/man/r_latitudes.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2 (4.1.1): do not edit by hand
2 | % Please edit documentation in R/r_latitudes.R
3 | \name{r_latitudes}
4 | \alias{r_latitudes}
5 | \title{Generate random fake latitude values.}
6 | \usage{
7 | r_latitudes(n)
8 | }
9 | \arguments{
10 | \item{n}{number of observations.}
11 | }
12 | \value{
13 | A character vector of \code{n} randomly generated latitude values.
14 | }
15 | \description{
16 | Generate random fake latitude values.
17 | }
18 | \examples{
19 | r_latitudes(10)
20 | }
21 |
22 |
--------------------------------------------------------------------------------
/man/r_longitudes.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2 (4.1.1): do not edit by hand
2 | % Please edit documentation in R/r_longitudes.R
3 | \name{r_longitudes}
4 | \alias{r_longitudes}
5 | \title{Generate random fake longitude values.}
6 | \usage{
7 | r_longitudes(n)
8 | }
9 | \arguments{
10 | \item{n}{number of observations.}
11 | }
12 | \value{
13 | A character vector of \code{n} randomly generated longitude values.
14 | }
15 | \description{
16 | Generate random fake longitude values.
17 | }
18 | \examples{
19 | r_longitudes(10)
20 | }
21 |
22 |
--------------------------------------------------------------------------------
/man/r_national_identification_numbers.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2 (4.1.1): do not edit by hand
2 | % Please edit documentation in R/r_national_identification_numbers.R
3 | \name{r_national_identification_numbers}
4 | \alias{r_national_identification_numbers}
5 | \title{Generate random fake national identification numbers.}
6 | \usage{
7 | r_national_identification_numbers(n)
8 | }
9 | \arguments{
10 | \item{n}{number of observations.}
11 | }
12 | \value{
13 | A character vector of \code{n} randomly generated national identification numbers.
14 | }
15 | \description{
16 | Generate random fake national identification numbers.
17 | }
18 | \examples{
19 | r_national_identification_numbers(10)
20 | }
21 |
22 |
--------------------------------------------------------------------------------
/man/r_phone_numbers.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2 (4.1.1): do not edit by hand
2 | % Please edit documentation in R/r_phone_numbers.R
3 | \name{r_phone_numbers}
4 | \alias{r_phone_numbers}
5 | \title{Generate random fake phone numbers.}
6 | \usage{
7 | r_phone_numbers(n, use_hyphens = FALSE, use_parentheses = FALSE,
8 | use_spaces = FALSE)
9 | }
10 | \arguments{
11 | \item{n}{number of observations.}
12 |
13 | \item{use_hyphens}{should hyphens be included.}
14 |
15 | \item{use_parentheses}{should parantheses be included.}
16 |
17 | \item{use_spaces}{should spaces be included.}
18 | }
19 | \value{
20 | A character vector of \code{n} randomly generated phone numbers.
21 | }
22 | \description{
23 | Generate random fake phone numbers.
24 | }
25 | \examples{
26 | r_phone_numbers(10)
27 | r_phone_numbers(10, use_hyphens = TRUE)
28 | r_phone_numbers(10, use_parentheses = TRUE)
29 | r_phone_numbers(10, use_spaces = TRUE)
30 | r_phone_numbers(10, use_parentheses = TRUE, use_hyphens = TRUE)
31 | r_phone_numbers(10, use_parentheses = TRUE, use_spaces = TRUE)
32 | }
33 |
34 |
--------------------------------------------------------------------------------
/tests/testthat.R:
--------------------------------------------------------------------------------
1 | library(testthat)
2 | library(generator)
3 |
4 | test_check("generator")
5 |
--------------------------------------------------------------------------------
/tests/testthat/test-r_credit_card_numbers.R:
--------------------------------------------------------------------------------
1 | library(generator)
2 | context("r_credit_card_numbers()")
3 |
4 | test_that("Produces the correct output.", {
5 | expect_equal(length(r_credit_card_numbers(100)), 100)
6 | })
7 |
8 | test_that("Produces the correct output type.", {
9 | expect_is(r_credit_card_numbers(100), "character")
10 | })
11 |
12 | test_that("Produces the correct errors.", {
13 | })
14 |
15 |
--------------------------------------------------------------------------------
/tests/testthat/test-r_date_of_births.R:
--------------------------------------------------------------------------------
1 | library(generator)
2 | context("r_date_of_births()")
3 |
4 | test_that("Produces the correct output.", {
5 | expect_equal(length(r_date_of_births(100)), 100)
6 | })
7 |
8 | test_that("Produces the correct output type.", {
9 | expect_is(r_date_of_births(100), "Date")
10 | })
11 |
12 | test_that("Produces the correct errors.", {
13 | })
14 |
15 |
--------------------------------------------------------------------------------
/tests/testthat/test-r_email_addresses.R:
--------------------------------------------------------------------------------
1 | library(generator)
2 | context("r_email_addresses()")
3 |
4 | test_that("Produces the correct output.", {
5 | expect_equal(length(r_email_addresses(100)), 100)
6 | })
7 |
8 | test_that("Produces the correct output type.", {
9 | expect_is(r_email_addresses(100), "character")
10 | })
11 |
12 | test_that("Produces the correct errors.", {
13 | })
14 |
15 |
--------------------------------------------------------------------------------
/tests/testthat/test-r_full_names.R:
--------------------------------------------------------------------------------
1 | library(generator)
2 | context("r_full_names()")
3 |
4 | test_that("Produces the correct output.", {
5 | expect_equal(length(r_full_names(100)), 100)
6 | })
7 |
8 | test_that("Produces the correct output type.", {
9 | expect_is(r_full_names(100), "character")
10 | })
11 |
12 | test_that("Produces the correct errors.", {
13 | })
14 |
15 |
--------------------------------------------------------------------------------
/tests/testthat/test-r_ip_addresses.R:
--------------------------------------------------------------------------------
1 | library(generator)
2 | context("r_ipv4_addresses()")
3 |
4 | test_that("Produces the correct output.", {
5 | expect_equal(length(r_ipv4_addresses(100)), 100)
6 | })
7 |
8 | test_that("Produces the correct output type.", {
9 | expect_is(r_ipv4_addresses(100), "character")
10 | })
11 |
12 | test_that("Produces the correct errors.", {
13 | })
14 |
15 |
--------------------------------------------------------------------------------
/tests/testthat/test-r_latitudes.R:
--------------------------------------------------------------------------------
1 | library(generator)
2 | context("r_latitudes()")
3 |
4 | test_that("Produces the correct output.", {
5 | expect_equal(length(r_latitudes(100)), 100)
6 | })
7 |
8 | test_that("Produces the correct output type.", {
9 | expect_is(r_latitudes(100), "numeric")
10 | })
11 |
12 | test_that("Produces the correct errors.", {
13 | })
14 |
15 |
--------------------------------------------------------------------------------
/tests/testthat/test-r_longitudes.R:
--------------------------------------------------------------------------------
1 | library(generator)
2 | context("r_longitudes()")
3 |
4 | test_that("Produces the correct output.", {
5 | expect_equal(length(r_longitudes(100)), 100)
6 | })
7 |
8 | test_that("Produces the correct output type.", {
9 | expect_is(r_longitudes(100), "numeric")
10 | })
11 |
12 | test_that("Produces the correct errors.", {
13 | })
14 |
15 |
--------------------------------------------------------------------------------
/tests/testthat/test-r_national_identification_numbers.R:
--------------------------------------------------------------------------------
1 | library(generator)
2 | context("r_national_identification_numbers()")
3 |
4 | test_that("Produces the correct output.", {
5 | expect_equal(length(r_national_identification_numbers(100)), 100)
6 | })
7 |
8 | test_that("Produces the correct output type.", {
9 | expect_is(r_national_identification_numbers(100), "character")
10 | })
11 |
12 | test_that("Produces the correct errors.", {
13 | })
14 |
15 |
--------------------------------------------------------------------------------
/tests/testthat/test-r_phone_numbers.R:
--------------------------------------------------------------------------------
1 | library(generator)
2 | context("r_phone_numbers()")
3 |
4 | test_that("Produces the correct output.", {
5 | expect_equal(length(r_phone_numbers(100)), 100)
6 | expect_equal(length(r_phone_numbers(100, use_parentheses = TRUE)), 100)
7 | })
8 |
9 | test_that("Produces the correct output type.", {
10 | expect_is(r_phone_numbers(100), "character")
11 | })
12 |
13 | test_that("Produces the correct errors.", {
14 | })
15 |
16 |
--------------------------------------------------------------------------------