if (!require(haven)){
install.packages("haven", dependencies = TRUE)
library(haven)
}
if (!require(tidyverse)){
install.packages("tidyverse", dependencies = TRUE)
library(tidyverse)
}
if (!require(summarytools)){
install.packages("summarytools", dependencies = TRUE)
library(summarytools)
}
dataset<- read_sav("https://osf.io/kd4ej/download")
dataset %>%
select(CoinFlip, FFM_4, Potter2) -> newVariable
print(dfSummary(newVariable, graph.magnif = .75), method = 'render')
Warning: unable to open connection to X11 display ''
| No | Variable | Label | Stats / Values | Freqs (% of Valid) | Graph | Valid | Missing | ||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | CoinFlip [haven_labelled, vctrs_vctr, double] | Flip a coin. Is it heads or tails? |
|
|
118 (96.7%) | 4 (3.3%) | |||||||||||||||||||||||||||||||||||
| 2 | FFM_4 [haven_labelled, vctrs_vctr, double] | I see Myself as Someone Who..... - Is depressed, blue |
|
|
98 (80.3%) | 24 (19.7%) | |||||||||||||||||||||||||||||||||||
| 3 | Potter2 [haven_labelled, vctrs_vctr, double] | Forest or River? |
|
|
101 (82.8%) | 21 (17.2%) |
Generated by summarytools 1.0.1 (R version 4.3.2)
2024-02-14
• if() https://rdocumentation.org/packages/Tides/versions/2.1/topics/IF
• require() https://rdocumentation.org/packages/Require/versions/0.3.1
• library() https://rdocumentation.org/packages/adapr/versions/2.0.0/topics/Library
• read_sav() https://rdocumentation.org/packages/haven/versions/2.5.3/topics/labelled_spss
• select() https://rdocumentation.org/packages/Select/versions/1.4
• print() https://rdocumentation.org/packages/psychmeta/versions/2.6.5/topics/print
• dfSummary() https://rdocumentation.org/packages/bioassays/versions/1.0.1/topics/dfsummary