calpass_create_isk {calpassapi}R Documentation

Create interSegmentKey's for students

Description

Create interSegmentKey's from students' first names, last names, genders, and birthdates

Usage

calpass_create_isk(first_name, last_name, gender, birthdate)

Arguments

first_name

a character vector of students' first names.

last_name

a character vector of students' last names.

gender

a character vector of students' genders. The first character will be used (uppercase'd automatically), and should take on values 'M', 'F', or 'X' (use 'X' for unknown or did not disclosed).

birthdate

a character or numeric vector of birthdates of the form 'yyyymmdd'.

Value

a vector of interSegmentKey's

Author(s)

Vinh Nguyen

Examples

## single
calpass_create_isk(first_name='Jane', last_name='Doe'
 , gender='F', birthdate=20001231)
## data frame
## Not run: 
firstname <- c('Tom', 'Jane', 'Jo')
lastname <- c('Ng', 'Doe', 'Smith')
gender <- c('Male', 'Female', 'X')
birthdate <- c(2001231, 19990101, 19981111)
df <- data.frame(firstname, lastname
  , gender, birthdate, stringsAsFactors=FALSE)
library(dplyr)
df %>%
  mutate(isk=calpass_create_isk(first_name=firstname
    , last_name=lastname
    , gender=gender
    , birthdate
  ))

## End(Not run)

[Package calpassapi version 0.0.3 Index]