50% off: Unlimited data and AI learning.
State of Data and AI Literacy Report 2025

OpenRepGrid (version 0.1.12)

swapConstructs: Swap the position of two constructs in a grid.

Description

Swap the position of two constructs in a grid.

Usage

swapConstructs(x, pos1 = 1, pos2 = 1)

Arguments

x

repgrid object.

pos1

Row number of first construct to be swapped (default=1).

pos2

Row number of second construct to be swapped (default=1).

Value

repgrid object

Examples

Run this code
# NOT RUN {
   x <- randomGrid()
   swapConstructs(x, 1, 3)       # swap constructs 1 and 3
   swapConstructs(x, 1:2, 3:4)   # swap construct 1 with 3 and 2 with 4
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab