Learn R Programming

OpenRepGrid (version 0.1.17)

shift: Shift construct or element to first position.

Description

Shifts the whole grid vertically or horizontally so that the order remains the same but the prompted element or construct appears in first position.

Usage

shift(x, c = 1, e = 1)

Value

repgrid object.

Arguments

x

repgrid object.

c

Index of construct to be shifted to first position.

e

Index of element to be shifted to first position.

Examples

Run this code
if (FALSE) {

# shift element 13: 'Ideal self' to first position
shift(feixas2004, 13)

x <- randomGrid(5, 10)
shift(x, 3, 5)
}

Run the code above in your browser using DataLab