-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathREADME.Rmd
114 lines (88 loc) · 4.15 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
---
output: github_document
always_allow_html: yes
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-"
)
library(circumplex)
library(kableExtra)
set.seed(12345)
```
# circumplex <img src="man/figures/logo.png" align="right" alt="" />
<!-- badges: start -->
[![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)
<!-- badges: end -->
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.