id.add_valid_ssn_col: Add a valid_ssn column to a data.frame or data.table.

Description Usage Arguments Examples

View source: R/identifier.R

Description

Add a valid_ssn column to a data.frame or data.table.

Usage

1

Arguments

df

data.frame or data.table with an ssn column.

ssn_field

Name of the ssn column/field.

Examples

1
2
3
4
5
6
7
8
ssn_df <- data.frame(ssn = c("123-45-6789", "368-96-8955", "999998888", "287-65-4321"))
ssn_df <- id.valid_ssn_col(ssn_df, "ssn")
ssn_df
ssn ssn_valid
1 123-45-6789    FALSE
2 367-94-8940     TRUE
3   999998888    FALSE
4 287-65-4321     TRUE

dads2busy/dataplumbr documentation built on July 2, 2021, 3:24 a.m.