You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
smidget edited this page Jul 19, 2012
·
3 revisions
Purpose
To create a new variable to use in OpenSHAPA. NOTE: This function simple creates a new RVariable with a list of arguments, it does not write that variable back to the OpenSHAPA database unless you write it back with setVariable.
Parameters
Name
The name of the new variable
Arguments* (optional)
A list of arguments to add to the column upon creation. Note: onset, offset, and ordinal are mandatory arguments and will always be added. If this is left blank, a single argument called "var" will be added. You can add as many arguments as you'd like here. See below for syntax.
Examples
# Create a new variable called "trial" with some argumentstrial=createVariable("trial","trialnum","unit","condition")# Create a new variable called comments with no arguments# This creates a new column with only a "var" argument that can be used.comments=createVariable("comments")# You can add cells and what not here if you want to# Write it back to the OpenSHAPA DBsetVariable(trial)setVariable(comments)