Skip to content
This repository has been archived by the owner on Aug 30, 2019. It is now read-only.

makeReliability

Jesse Lingeman edited this page Jul 20, 2012 · 1 revision

Purpose

Shortcut method to create a reliability column based on a previously coded column. Note: This function will immediately write the new column back to the OpenSHAPA database.

Parameters

Rel Name (String)

The name of the new reliability column we are going to make

Variable to Copy (String or RVariable)

The variable that we are using as the basis for this reliability column. We can pass either a string for the column name here or the RVariable itself.

Multiple of Cells to Keep (Integer)

The modulo of cells to keep. For example, if this parameter is 2, we will keep every other cell. If it is 1 we keep every cell, 3 we keep every third cell, and so on. NOTE: A special case of this parameter is 0. If 0 is used, no cells will be copied over. This can be useful in creating a blank rel column with the same arguments as the primary column.

Arguments to Keep* (Strings, as many as you want)

These are the arguments that will be carried over from the original column. For example, if we didn't want to have the reliability coder code a cell's onset or a cell's trial number, we would pass "onset" and "trialnum" into this parameter. You can list as many as you want here.

Returns

The RVariable that represents the newly created reliability column.

Examples

# We have a trial column with the arguments trialnum, unit, and outcome.
# We only care about the reliability coder coding outcome, so we want
# to carry onset, offset, trialnum, and unit over to the reliablity
# column. We want to keep every fourth cell (25%)

makeReliability("rel.trial", "trial", 4, "onset", "offset", "trialnum", "unit")

# We don't have to write it back, it automatically is written back.