An open API service indexing awesome lists of open source software.

https://github.com/jmgirard/circumplex

R Package for the Analysis and Visualization of Circumplex Data
https://github.com/jmgirard/circumplex

circular circumplex data-analysis ggplot2 interpersonal psychology r r-package rcpparmadillo rstats tidyverse

Last synced: about 2 months ago
JSON representation

R Package for the Analysis and Visualization of Circumplex Data

Awesome Lists containing this project

README

          

---
output: github_document
always_allow_html: yes
---

```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-"
)
library(circumplex)
library(kableExtra)
set.seed(12345)
```

# circumplex

[![CRAN status](https://www.r-pkg.org/badges/version/circumplex)](https://CRAN.R-project.org/package=circumplex)
[![R-CMD-check](https://github.com/jmgirard/circumplex/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/jmgirard/circumplex/actions/workflows/R-CMD-check.yaml)
[![Codecov test coverage](https://codecov.io/gh/jmgirard/circumplex/graph/badge.svg)](https://app.codecov.io/gh/jmgirard/circumplex)
[![test-coverage](https://github.com/jmgirard/circumplex/actions/workflows/test-coverage.yaml/badge.svg)](https://github.com/jmgirard/circumplex/actions/workflows/test-coverage.yaml)
[![pkgdown](https://github.com/jmgirard/circumplex/actions/workflows/pkgdown.yaml/badge.svg)](https://github.com/jmgirard/circumplex/actions/workflows/pkgdown.yaml)

The goal of *circumplex* is to provide a powerful, flexible, and user-friendly way to analyze and visualize circumplex data. It was created and is maintained by [Jeffrey Girard](https://affcom.ku.edu/girard/); it was inspired by work from and was developed under advisement from [Johannes Zimmermann](https://www.uni-kassel.de/fb01/institute/institut-fuer-psychologie/fachgebiete/differentielle-psychologie/prof-dr-johannes-zimmermann) and [Aidan Wright](https://sites.lsa.umich.edu/aidangcw-lab/). You can learn more about using this package through the vignette articles available on the [package website](https://circumplex.jmgirard.com/) or through `?circumplex`.

## Installation

``` r
# Install release version from CRAN
install.packages("circumplex")

# Install development version from GitHub
devtools::install_github("jmgirard/circumplex")
```

## Usage

### Example 1

```{r analysis1}
data("jz2017")
results <- ssm_analyze(
data = jz2017,
scales = c("PA", "BC", "DE", "FG", "HI", "JK", "LM", "NO"),
angles = c(90, 135, 180, 225, 270, 315, 360, 45),
measures = c("NARPD", "ASPD"),
measures_labels = c("Narcissistic PD", "Antisocial PD")
)
summary(results)
```

``` r
ssm_table(results, drop_xy = TRUE)
```

```{r table1, echo = FALSE, results = "asis"}
ssm_table(results, drop_xy = TRUE, render = FALSE) %>%
kableExtra::kbl(caption = circumplex:::dcaption(results)) %>%
kableExtra::kable_styling(full_width = TRUE, font_size = 12)
```

```{r plot}
ssm_plot_circle(results)
```

```{r plot2}
ssm_plot_curve(results)
```

### Example 2

```{r analysis2}
results2 <- ssm_analyze(
data = jz2017,
scales = PANO(),
angles = octants(),
grouping = "Gender",
contrast = TRUE
)
summary(results2)
```

``` r
ssm_table(results2, drop_xy = TRUE)
```

```{r table2, echo = FALSE, results = "asis"}
ssm_table(results2, drop_xy = TRUE, render = FALSE) %>%
kableExtra::kbl(caption = circumplex:::dcaption(results)) %>%
kableExtra::kable_styling(full_width = TRUE, font_size = 12)
```

```{r plot3}
ssm_plot_contrast(results2, drop_xy = TRUE)
```

## Code of Conduct
Please note that the 'circumplex' project is released with a
[Contributor Code of Conduct](https://circumplex.jmgirard.com/CODE_OF_CONDUCT.html).
By contributing to this project, you agree to abide by its terms.

## References

Girard, J. M., Zimmermann, J., & Wright, A. G. C. (2018). New tools for circumplex data analysis and visualization in R. _Meeting of the Society for Interpersonal Theory and Research._ Montreal, Canada.

Zimmermann, J., & Wright, A. G. C. (2017). Beyond description in interpersonal construct validation: Methodological advances in the circumplex Structural Summary Approach. _Assessment, 24_(1), 3–23.

Wright, A. G. C., Pincus, A. L., Conroy, D. E., & Hilsenroth, M. J. (2009). Integrating methods to optimize circumplex description and comparison of groups. _Journal of Personality Assessment, 91_(4), 311–322.