Title: | Detect Data Containing Personally Identifiable Information |
Version: | 0.1.0 |
Description: | Allows users to quickly and easily detect data containing Personally Identifiable Information (PII) through convenience functions. |
URL: | https://github.com/paulhendricks/detector |
BugReports: | https://github.com/paulhendricks/detector/issues |
Depends: | R (≥ 3.1.2) |
License: | MIT + file LICENSE |
LazyData: | true |
Imports: | stringr |
Suggests: | testthat, generator |
NeedsCompilation: | no |
Packaged: | 2015-08-27 19:58:34 UTC; phendricks |
Author: | Paul Hendricks [aut, cre] |
Maintainer: | Paul Hendricks <paul.hendricks.2013@owu.edu> |
Repository: | CRAN |
Date/Publication: | 2015-08-28 01:13:37 |
detector: Detect Data Containing Personally Identifiable Information
Description
detector: Detect Data Containing Personally Identifiable Information
Detect if a data object contains PII.
Description
Detect if a data object contains PII.
Usage
detect(.x)
## Default S3 method:
detect(.x)
## S3 method for class 'character'
detect(.x)
## S3 method for class 'data.frame'
detect(.x)
Arguments
.x |
A data object. |
Value
A logical value indicating if that data object contains PII.
Methods (by class)
-
default
: Method for default vectors. -
character
: Method for character vectors. -
data.frame
: Method for data.frames.
Examples
# atomic vectors
detect(letters)
detect(1:10)
detect(as.Date("2014-01-01"))
# data.frames
detect(mtcars)
Test if a character vector has any e-mail addresses.
Description
Test if a character vector has any e-mail addresses.
Usage
has_email_addresses(.x)
Arguments
.x |
A character vector. |
Value
A logical value indicating if that string has any e-mail addresses.
Examples
# Examples
has_email_addresses("hello") # FALSE
has_email_addresses("hello@world.edu") # TRUE
Test if a character vector has any national identification numbers.
Description
Test if a character vector has any national identification numbers.
Usage
has_national_identification_numbers(.x)
Arguments
.x |
A character vector. |
Value
A logical value indicating if that string has any national identification numbers.
Examples
# Examples
# Examples
has_national_identification_numbers("hello") # FALSE
has_national_identification_numbers(65884) # FALSE
has_national_identification_numbers("111-33-5555") # TRUE
has_national_identification_numbers(1113335555) # FALSE
Test if a character vector has any phone numbers.
Description
Test if a character vector has any phone numbers.
Usage
has_phone_numbers(.x)
Arguments
.x |
A character vector. |
Value
A logical value indicating if that string has any phone numbers.
Examples
# Examples
has_phone_numbers("hello") # FALSE
has_phone_numbers(65884) # FALSE
has_phone_numbers("111-333-5555") # TRUE
has_phone_numbers(1113335555) # TRUE
Test if a string is an e-mail address.
Description
Test if a string is an e-mail address.
Usage
is_email_address(.x)
Arguments
.x |
A character vector. |
Value
A logical value indicating if that string is an e-mail address.
Examples
# Examples
is_email_address("hello") # FALSE
is_email_address("hello@world.edu") # TRUE
Test if a string is a national identification number.
Description
Strictly works for only US national identification numbers.
Usage
is_national_identification_number(.x)
Arguments
.x |
A string or numeric vector. |
Value
A logical value indicating if that string is a national identification number.
Examples
# Examples
is_national_identification_number("hello") # FALSE
is_national_identification_number(65884) # FALSE
is_national_identification_number("111-33-5555") # TRUE
is_national_identification_number(1113335555) # FALSE
Test if a string is a phone number.
Description
Strictly works for only US phone numbers.
Usage
is_phone_number(.x)
Arguments
.x |
A string or numeric vector. |
Value
A logical value indicating if that string is a phone number.
Examples
# Examples
is_phone_number("hello") # FALSE
is_phone_number(65884) # FALSE
is_phone_number("111-333-5555") # TRUE
is_phone_number(1113335555) # TRUE