Package: matRiks 0.1.3

Andrea Brancaccio
matRiks: Generates Raven-Like Matrices According to Rules
Generates Raven like matrices according to different rules and the response list associated to the matrix. The package can generate matrices composed of 4 or 9 cells, along with a response list of 11 elements (the correct response + 10 incorrect responses). The matrices can be generated according to both logical rules (i.e., the relationships between the elements in the matrix are manipulated to create the matrix) and visual-spatial rules (i.e., the visual or spatial characteristics of the elements are manipulated to generate the matrix). The graphical elements of this package are based on the 'DescTools' package. This package has been developed within the PRIN2020 Project (Prot. 20209WKCLL) titled "Computerized, Adaptive and Personalized Assessment of Executive Functions and Fluid Intelligence" and founded by the Italian Ministry of Education and Research.
Authors:
matRiks_0.1.3.tar.gz
matRiks_0.1.3.tar.gz(r-4.5-noble)matRiks_0.1.3.tar.gz(r-4.4-noble)
matRiks_0.1.3.tgz(r-4.4-emscripten)matRiks_0.1.3.tgz(r-4.3-emscripten)
matRiks.pdf |matRiks.html✨
matRiks/json (API)
NEWS
# Install 'matRiks' in R: |
install.packages('matRiks', repos = 'https://cloud.r-project.org') |
This package does not link to any Github/Gitlab/R-forge repository. No issue tracker or development information is available.
Last updated 1 years agofrom:0c095a44da. Checks:3 OK. Indexed: yes.
Target | Result | Latest binary |
---|---|---|
Doc / Vignettes | OK | Mar 13 2025 |
R-4.5-linux | OK | Mar 13 2025 |
R-4.4-linux | OK | Mar 13 2025 |
Exports:axebiscuitchange_colorchange_color.figurecirclecofcof.charactercof.figurecof.numericcomcom.matriksconcatenationconcatenation.doubleconcatenation.integerconcatenation.listcorrectcorrect.matrikscrosscross_dicedecofdecof.figurediaglinediagline_invdicedifferencedifference.matriksdotdown_petaldrawdraw.figuredraw.matriksellipseh_arc_left_downh_arc_left_uph_arc_right_downh_arc_right_uphexagonhidehide.figurehlinehor_bow_tiehorizontal_eighthorizontal_shorizontal_s_invicic_flipic_flip.matriksic_incic_inc.matriksic_negic_neg.matriksic_sizeic_size.matriksidentityidentity.figureleft_petallilylogiclogic.figureluckluck4maltamarginmat_applymat_apply.figuremaximileyninjapacmanpentagonphantompizza_2pizza_2_invpizza_4repetitionrepetition.matriksreplacereplace.figureresponse_listresponse_list.matriksright_petalrotaterotate.figures_axes_biscuits_hor_bow_ties_horizontal_eights_horizontal_ss_horizontal_s_invs_lilys_maltas_maxis_mileys_ninjas_pizza_2s_pizza_2_invs_pizza_4s_stars_vert_bow_ties_vertical_eights_vertical_ss_vertical_s_invsemi_circle_bottomsemi_circle_bottom_invsemi_circle_topsemi_circle_top_invshadeshade.figureshapeshape.figureshowshow.figuresizesize.figureslicesplit_matsplit_mat.figuresplit_mat.matrikssquaresquare4startriangleup_petalv_arc_left_downv_arc_left_upv_arc_right_downv_arc_right_upvert_bow_tievertical_eightvertical_svertical_s_invvlinewpwp.matriksX
Dependencies:askpassbitbit64bootcellrangerclassclicliprcpp11crayoncurldata.tableDescToolse1071ExactexpmfansiforcatsgldgluehavenhmshttrjsonlitelatticelifecyclelmommagrittrMASSMatrixmimemvtnormopensslpillarpkgconfigprettyunitsprogressproxyR6RcppreadrreadxlrematchrlangrootSolverstudioapisystibbletidyselecttzdbutf8vctrsvroomwithr
black-figures
Rendered fromblack-figures.Rmd
usingknitr::rmarkdown
on Mar 13 2025.Last update: 2023-10-31
Started: 2023-10-31
circle-sections
Rendered fromcircle-sections.Rmd
usingknitr::rmarkdown
on Mar 13 2025.Last update: 2023-10-31
Started: 2023-10-31
closed-figures
Rendered fromclosed-figures.Rmd
usingknitr::rmarkdown
on Mar 13 2025.Last update: 2023-10-31
Started: 2023-10-31
eight-shapes-figures
Rendered fromeight-shapes-figures.Rmd
usingknitr::rmarkdown
on Mar 13 2025.Last update: 2023-10-31
Started: 2023-10-31
flowers-figures
Rendered fromflowers-figures.Rmd
usingknitr::rmarkdown
on Mar 13 2025.Last update: 2023-10-31
Started: 2023-10-31
Generate matRiks
Rendered fromgenerate_matriks.Rmd
usingknitr::rmarkdown
on Mar 13 2025.Last update: 2023-11-21
Started: 2023-10-31
lines
Rendered fromlines.Rmd
usingknitr::rmarkdown
on Mar 13 2025.Last update: 2023-10-31
Started: 2023-10-31
other-figures
Rendered fromother-figures.Rmd
usingknitr::rmarkdown
on Mar 13 2025.Last update: 2023-10-31
Started: 2023-10-31
Citation
To cite package ‘matRiks’ in publications use:
Brancaccio A, Epifania OM, de Chiusole D (2024). matRiks: Generates Raven-Like Matrices According to Rules. R package version 0.1.3, https://CRAN.R-project.org/package=matRiks.
ATTENTION: This citation information has been auto-generated from the package DESCRIPTION file and may need manual editing, see ‘help("citation")’.
Corresponding BibTeX entry:
@Manual{, title = {matRiks: Generates Raven-Like Matrices According to Rules}, author = {Andrea Brancaccio and Ottavia M. Epifania and Debora {de Chiusole}}, year = {2024}, note = {R package version 0.1.3}, url = {https://CRAN.R-project.org/package=matRiks}, }
Readme and manuals
matRiks
The goal of matRiks
is to generate Raven-like stimuli according to
rules. This package has been developed by Dr. Andrea Brancaccio and
Dr. Ottavia M. Epifania.
What it does
The matRiks
package is a convenient tool for generating Raven-like
stimuli according to both logical rules (i.e., the relationships between
the elements in the matrix are manipulated to create the matrix) and
visuospatial rules (i.e., the visual or spatial characteristics of the
elements are manipulated to generate the matrix). The response list
associated with each matrix is generated as well, containing 11 response
options (i.e., one correct response and 10 distractors) among which the
users can choose the most apt for their aims. The distractors are bound
to both the rules and the directional logic that have been used for
generating the matrix. As such, not all the distractors can be generated
for all the matrices. In case a distractor can not be generated for a
given matrix, a warning is thrown and the distractors is covered by a
thick black X.
Installation
You can install the development version of matRiks from GitHub with:
# install.packages("devtools")
devtools::install_github("OttaviaE/matRiks")
Example
This code provides an example on how to generate a basic matriks by
using one figure (pacman()
) and manipulating its rotation (rotate
)
horizontally:
library(matRiks)
#> Warning: il pacchetto 'matRiks' è stato creato con R versione 4.3.2
#>
#> Caricamento pacchetto: 'matRiks'
#> Il seguente oggetto è mascherato da 'package:methods':
#>
#> show
#> I seguenti oggetti sono mascherati da 'package:base':
#>
#> identity, replace
## Generate a simple matriks by horizontally rotating a pacman
my_mat <- mat_apply(pacman(), hrules = "rotate")
# draw the matriks
draw(my_mat)

Along with the matriks, its associated response list can be generated as well:
# generate the response list
responses <- response_list(my_mat)
#> Warning in repetition.matriks(obj): R-Top is equal to the correct response
#> Warning in ic_inc.matriks(obj): IC-Inc cannot be obtained with a single figure
# draw the response list and print the title of the distractors
draw(responses, main = TRUE)

Since two distractors cannot be generated given the rule and the directional logic used for generating the matriks, two warnings are thrown and the related distractors are crossed out by a thick black X.
This code print a small selection of distractors:
draw(responses, main = TRUE, distractors = c("correct", "r_diag", "wp_matrix", "difference", "ic_flip"))

Help Manual
Help page | Topics |
---|---|
Coordinates of an axe | axe s_axe |
Coordinates of a biscuit | biscuit s_biscuit |
Change shade | change_color change_color.figure |
Coordinates of a circle | circle |
Concatenation of figures (method) | cof cof.character cof.double cof.figure cof.numeric com com.matriks concatenation concatenation.character concatenation.double concatenation.integer concatenation.list |
Correct response (Method) | correct correct.matriks |
Coordinates of a cross | cross X |
Split the elements of a figure (Method) | decof decof.figure |
Coordinates of a dice with four dots | cross_dice dice |
Difference distractor (Method) | difference difference.matriks |
Coordinates of a dot | dot |
Draw (Method) | draw draw.figure draw.matriks draw.responses |
Coordinates of an ellipse | ellipse |
Coordinates of a hexagon | hexagon |
Hide figures (Method) | hide |
Hide figures | hide.figure |
Incomplete correlate distractors (method) | ic ic.matriks ic_flip ic_flip.matriks ic_inc ic_inc.matriks ic_neg ic_neg.matriks ic_size ic_size.matriks |
Identity rule (Method) | identity identity.figure |
Define the coordinates of a lily | lily s_lily |
Logical rules (Method) | logic logic.figure |
Coordinates of a luck | luck luck4 |
Coordinates of a Malta cross | malta s_malta |
Margin rule (Method) | margin margin.figure |
Apply rule to generate a matriks (method) | mat_apply mat_apply.figure |
Coordinates of a maxi | maxi s_maxi |
Define the coordinates of a miley | miley s_miley |
Coordinates of a ninja star | ninja s_ninja |
Coordinates of a pacman | pacman |
Coordinates of a pentagon | pentagon |
Coordinates of a panthom figure | phantom |
Coordinates of a pizza with four slices | pizza_2 pizza_2_inv pizza_4 s_pizza_2 s_pizza_2_inv s_pizza_4 |
Repetition distractors (Method) | repetition repetition.matriks |
Replace figures (Method) | replace replace.figure |
Response list (Method) | response_list response_list.matriks |
Rotation rule (Method) | rotate rotate.figure |
Coordinates of an upward-facing left semi-circle | semi_circle_bottom semi_circle_bottom_inv |
Coordinates of a downward-facing left semi-circle | semi_circle_top semi_circle_top_inv |
Shade rule (Method) | shade shade.figure |
Shape rule (Method) | shape shape.figure |
Show figures (Method) | show show.figure |
Sizing rule (Method) | size size.figure |
Coordinates of a pizza slice | slice |
Split the correct response (Method) | split_mat split_mat.figure split_mat.matriks |
Coordinates of a square | square square4 |
Coordinates of a star | star s_star |
Coordinates of a triangle | triangle |
Define the coordinates of petals | down_petal left_petal right_petal up_petal |
Coordinates for drawing circle arches | h_arc_left_down h_arc_left_up h_arc_right_down h_arc_right_up v_arc_left_down v_arc_left_up v_arc_right_down v_arc_right_up |
Coordinates of bow ties | hor_bow_tie s_hor_bow_tie s_vert_bow_tie vert_bow_tie |
Eight-shaped figures | horizontal_eight s_horizontal_eight s_vertical_eight vertical_eight |
Coordinates of S-shaped figures | horizontal_s horizontal_s_inv s_horizontal_s s_horizontal_s_inv s_vertical_s s_vertical_s_inv vertical_s vertical_s_inv |
Coordinates of lines | diagline diagline_inv hline vline |
Wrong principle distractors (method) | wp wp.matriks |