reverse: Reverse constructs / swaps construct poles

Description Usage Arguments Value Note Examples

View source: R/repgrid-basicops.r

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 revesed selected constructs.

Usage

1
2
3
swapPoles(x, pos)

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

Arguments

x

A repgrid object.

pos

Row indexes of constructs to reverse..

Value

A repgrid object with reversed constructs.

Note

Please note that the scale of the rating grid has to be set in order to reverse constructs. If the scale is unknown no reversal occurs and an error is raised.

Examples

1
2
3
4
5
6
7
8
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

markheckmann/OpenRepGrid documentation built on April 30, 2021, 2:33 a.m.