Skip to contents

Allows to get and set construct poles. Replaces the older functions getConstructNames, getConstructNames2, and eNames which are deprecated.

Usage

constructs(x, collapse = FALSE, sep = " - ")

constructs(x, i, j) <- value

leftpoles(x)

leftpoles(x, position) <- value

rightpoles(x)

rightpoles(x, position) <- value

Arguments

x

A repgrid object.

collapse

Return vector with both poles instead.

sep

Separator if collapse = TRUE, default is " - ".

i, j

Row and column Index of repgrid matrix.

value

Character vector of construct poles names.

position

Index where to insert construct

Examples


# shorten object name
x <- boeker

## get construct poles
constructs(x) # both left and right poles
#>                leftpole                rightpole
#> 1              balanced get along with conflicts
#> 2              isolated                 sociable
#> 3    closely integrated                 excluded
#> 4            discursive                  passive
#> 5           open minded              indifferent
#> 6                dreamy            dispassionate
#> 7  practically oriented                depressed
#> 8               playful                  serious
#> 9       socially minded                  selfish
#> 10          quarrelsome                 peaceful
#> 11             artistic                technical
#> 12           scientific                emotional
#> 13            introvert                extrovert
#> 14           wanderlust            home oriented
leftpoles(x) # left poles only
#>  [1] "balanced"             "isolated"             "closely integrated"  
#>  [4] "discursive"           "open minded"          "dreamy"              
#>  [7] "practically oriented" "playful"              "socially minded"     
#> [10] "quarrelsome"          "artistic"             "scientific"          
#> [13] "introvert"            "wanderlust"          
rightpoles(x)
#>  [1] "get along with conflicts" "sociable"                
#>  [3] "excluded"                 "passive"                 
#>  [5] "indifferent"              "dispassionate"           
#>  [7] "depressed"                "serious"                 
#>  [9] "selfish"                  "peaceful"                
#> [11] "technical"                "emotional"               
#> [13] "extrovert"                "home oriented"           
constructs(x, collapse = TRUE)
#>  [1] "balanced - get along with conflicts" "isolated - sociable"                
#>  [3] "closely integrated - excluded"       "discursive - passive"               
#>  [5] "open minded - indifferent"           "dreamy - dispassionate"             
#>  [7] "practically oriented - depressed"    "playful - serious"                  
#>  [9] "socially minded - selfish"           "quarrelsome - peaceful"             
#> [11] "artistic - technical"                "scientific - emotional"             
#> [13] "introvert - extrovert"               "wanderlust - home oriented"         

## replace construct poles
constructs(x)[1, 1] <- "left pole 1"
constructs(x)[1, "leftpole"] <- "left pole 1" # alternative
constructs(x)[1:3, 2] <- paste("right pole", 1:3)
constructs(x)[1:3, "rightpole"] <- paste("right pole", 1:3) # alternative
constructs(x)[4, 1:2] <- c("left pole 4", "right pole 4")

l <- leftpoles(x)
leftpoles(x) <- sample(l) # brind poles into random order
leftpoles(x)[1] <- "new left pole 1" # replace name of first left pole

# replace left poles of constructs 1 and 3
leftpoles(x)[c(1, 3)] <- c("new left pole 1", "new left pole 3")