Title: | Detect Data Containing Personally Identifiable Information |
---|---|
Description: | Allows users to quickly and easily detect data containing Personally Identifiable Information (PII) through convenience functions. |
Authors: | Paul Hendricks [aut, cre] |
Maintainer: | Paul Hendricks <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.1.0.9000 |
Built: | 2024-11-03 02:48:30 UTC |
Source: | https://github.com/paulhendricks/detector |
Detect if a data object contains PII.
detect(.x) ## Default S3 method: detect(.x) ## S3 method for class 'character' detect(.x) ## S3 method for class 'data.frame' detect(.x)
detect(.x) ## Default S3 method: detect(.x) ## S3 method for class 'character' detect(.x) ## S3 method for class 'data.frame' detect(.x)
.x |
A data object. |
A logical value indicating if that data object contains PII.
default
: Method for default vectors.
character
: Method for character vectors.
data.frame
: Method for data.frames.
# atomic vectors detect(letters) detect(1:10) detect(as.Date("2014-01-01")) # data.frames detect(mtcars)
# atomic vectors detect(letters) detect(1:10) detect(as.Date("2014-01-01")) # data.frames detect(mtcars)
detector: Detect Data Containing Personally Identifiable Information
Test if a character vector has any e-mail addresses.
has_email_addresses(.x)
has_email_addresses(.x)
.x |
A character vector. |
A logical value indicating if that string has any e-mail addresses.
# Examples has_email_addresses("hello") # FALSE has_email_addresses("[email protected]") # TRUE
# Examples has_email_addresses("hello") # FALSE has_email_addresses("[email protected]") # TRUE
Test if a character vector has any national identification numbers.
has_national_identification_numbers(.x)
has_national_identification_numbers(.x)
.x |
A character vector. |
A logical value indicating if that string has any national identification numbers.
# 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
# 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.
has_phone_numbers(.x)
has_phone_numbers(.x)
.x |
A character vector. |
A logical value indicating if that string has any phone numbers.
# Examples has_phone_numbers("hello") # FALSE has_phone_numbers(65884) # FALSE has_phone_numbers("111-333-5555") # TRUE has_phone_numbers(1113335555) # TRUE
# 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.
is_email_address(.x)
is_email_address(.x)
.x |
A character vector. |
A logical value indicating if that string is an e-mail address.
# Examples is_email_address("hello") # FALSE is_email_address("[email protected]") # TRUE
# Examples is_email_address("hello") # FALSE is_email_address("[email protected]") # TRUE
Strictly works for only US national identification numbers.
is_national_identification_number(.x)
is_national_identification_number(.x)
.x |
A string or numeric vector. |
A logical value indicating if that string is a national identification number.
# 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
# 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
Strictly works for only US phone numbers.
is_phone_number(.x)
is_phone_number(.x)
.x |
A string or numeric vector. |
A logical value indicating if that string is a phone number.
# Examples is_phone_number("hello") # FALSE is_phone_number(65884) # FALSE is_phone_number("111-333-5555") # TRUE is_phone_number(1113335555) # TRUE
# Examples is_phone_number("hello") # FALSE is_phone_number(65884) # FALSE is_phone_number("111-333-5555") # TRUE is_phone_number(1113335555) # TRUE