count.sform: Count Sform Instances

Description Usage Arguments Value Author(s) Examples

Description

Counts and prints instances of an sform in a statslist.

Usage

1
count.sform(evls, sform, new.name)

Arguments

evls

An eventlist with eventlist attribute “char”, as well as element “event.key”.

sform

An sform regular expression using the evls$event.key[,1] uids.

new.name

Logical. Should count.sform guess at a descriptive name for the sform?. Default is TRUE.

Value

A list containing:

list

A list of length length(evls$eventlist), each numeric element of which is a count of the instances of the sform in the respective eventlist.

Author(s)

Christopher Steven Marcum

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
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"
count.sform(evls,sform)
count.sform(evls,sform)$Bill

#Compare with
count.sform(evls,sform,new.name=FALSE)

informR documentation built on May 1, 2019, 9:22 p.m.