Learn R Programming

OpenRepGrid (version 0.1.15)

swapPoles: Reverse constructs / swaps construct poles

Description

Constructs are bipolar. They can be reversed without a change in meaning. The function swaps the constructs poles and re-adjusts ratings accordingly, i.e. it reversed selected constructs.

Usage

swapPoles(x, pos)

reverse(x, pos = 1L:nrow(x))

Value

A repgrid object with reversed constructs.

Arguments

x

A repgrid object.

pos

Row indexes of constructs to reverse..

Examples

Run this code

x <- boeker

reverse(x) # reverse all constructs
reverse(x, 1) # reverse construct 1
reverse(x, 1:2) # reverse constructs 1 and 2

# swapPoles will become deprecated, use reverse instead
swapPoles(x, 1) # swap construct poles of construct

Run the code above in your browser using DataLab