invertVarOrder: Invert a 'P-by-Order (with Vars)' Matrix to 'P-by-Var (with...

View source: R/invertVarOrder.R

invertVarOrderR Documentation

Invert a 'P-by-Order (with Vars)' Matrix to 'P-by-Var (with Orders)' Matrix

Description

If working with a matrix that shows which item each participant completed 1st, 2nd, etc, it will often be more useful to invert this to show in which order the participant completed item #1, #2, etc.

Usage

invertVarOrder(pByOrder)
invertVarOrder(pByOrder, vorder = pscores)

Arguments

pByOrder

dataframe containing participant ID as column 1, and then columns describing which item was rated first, second, etc

vOrder

specify the order you would like the variables to be ordered (this is necessarily mainly if the cells of the pByOrder matrix are variable names rather than variable NUMBERS)

Value

A participant-by-item matrix detailing when participant rated each item


funfield-lab/fancyr documentation built on Nov. 21, 2023, 2:42 p.m.