Learn R Programming

events (version 0.5)

score: Score event codes with an event scale

Description

Gets scale scores for event codes

Usage

score(eventscale, codes)

Arguments

eventscale
An event scale
codes
Event codes

Value

Numerical values for each event codes from the scale

Details

Returns an array of scores corresponding to the the second argument's scale values or the scale's default value if not recognized.

You should use this function to avoid relying on the internal structure of event scales. They are currently lists, but this may change.