Generate Unique Id's for Events

Share:

Description

Internal function for generating unique single character id's for each unique event in an eventlist. May be useful for a user to call if, for some reason, event.key is lost from the eventlist.

Usage

1
gen.id(rawevents, print = TRUE)

Arguments

rawevents

a character string of events

print

logical, print the single character codes corresponding to the unique event values to stdout. Defaults to TRUE.

Details

Currently, the rawevents string must not contain more than 52 unique event types (i.e., 2Xlength(a:z)

Value

A character string of single character identifiers for each unique event.

Author(s)

Christopher Steven Marcum

Examples

1
2
3
4
rawevents<-sample(rep(c("ran","eat","stay","eat","ran","play"),5))
actors<-rep(c("Jim","Bill","Pete"),10)
idevents<-gen.id(rawevents)
idevents