reverse: Reverse constructs / swaps construct poles

View source: R/repgrid-basicops.r

swapPolesR Documentation

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))

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


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 14, 2024, 8:15 a.m.