Learn R Programming

informR (version 1.0-5)

sf2nms: Translate S-form Regular Expressions

Description

Translates S-forms into verbose names by regex substitution using the event.key in an eventlist.

Usage

sf2nms(event.key, sform)

Arguments

event.key
A two column matrix, possibly passed from evls$event.key
sform
An S-form regular expression using the evls$event.key[,1] uids.

Value

A list containing:
character
A ``translation'' by substitution of the sform in unique id form to its event type representation

Examples

Run this code
rawevents<-sample(rep(c("ran","eat","stay","eat","ran","play"),100))
actors<-rep(c("Jim","Bill","Pete"),10)
eventlist<-cbind(rawevents,actors)
evls<-gen.evl(eventlist)

sform<-"ab"
sf2nms(evls$event.key,sform)

Run the code above in your browser using DataLab