GetStudentNames {ProfessR} | R Documentation |
Extract Student Names from Roster.
Description
Given a roster of students, with (lastname, first name) format, extract a unique set of first names, with no blanks.
Usage
GetStudentNames(c1, dup.lets=1)
Arguments
c1 |
Character vector |
dup.lets |
NUmber of letters to add from last name in the event that first names are duplicated. |
Details
The function assumes the names are comma separated with lastname, firstname order. The code separates the names, removes blanks from the first name, and finds a unique set of names. If first names are not unique, the function extracts the first letters of the last names and the duplicated names and appends with a period.
Value
Character vector of unique first names
Author(s)
Jonathan M. Lees<jonathan.lees@unc.edu>
Examples
g.first =c("Jason","Skyler","Adrian","Berkley","Jack",'David',
'David', 'Jim', 'Jim')
g.last =c('Joyce', 'Einstein', 'Hertz', 'Bailey', 'Compton',
'Jones', 'Wilson', 'Smith', 'Anderson' )
c2 = paste(g.last, g.first, sep=', ')
K = GetStudentNames(c2)
[Package ProfessR version 2.4-3 Index]