if (!require("haven")) {
install.packages("haven")
library("haven")}Loading required package: haven
if (!require("haven")) {
install.packages("haven")
library("haven")}Loading required package: haven
if (!require("psych")) {
install.packages("psych")
library("psych")}Loading required package: psych
if (!require("summarytools")) {
install.packages("summarytools")
library("summarytools")} Loading required package: summarytools
Warning in fun(libname, pkgname): couldn't connect to display ":0"
system might not have X11 capabilities; in case of errors when using dfSummary(), set st_options(use.x11 = FALSE)
##Import Data
datasetspss.web <- read_sav("https://osf.io/kd4ej/download")
Extraversion.keys <- make.keys(Extraversion, list(Extraversion = c(1, -2, 3, 4, -5, 6, -7, 8)))
# Score the scale
Extraversion.scales <- scoreItems(Extraversion.keys, Extraversion)
# Save the scores
Extraversion.scores <- Extraversion.scales$scores
dataset$Extraversion <- Extraversion.scores[,]
Extraversion.scales$alpha
Quarto enables you to weave together content and executable code into a finished document. To learn more about Quarto see https://quarto.org.
When you click the Render button a document will be generated that includes both content and the output of embedded code. You can embed code like this:
1 + 1[1] 2
You can add options to executable code like this
[1] 4
The echo: false option disables the printing of code (only output is displayed).