-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.Rmd
127 lines (107 loc) · 3.4 KB
/
index.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
115
116
117
118
119
120
121
122
123
124
125
126
127
---
title: "Principles of Psychological Assessment: With Applied Examples in R"
subtitle: "version 1.0.7"
author: "Isaac T. Petersen"
date: "`r Sys.Date()`"
site: bookdown::bookdown_site
documentclass: book
bibliography: [book.bib, packages.bib]
csl: apa.csl
link-citations: yes
description: "This is a textbook on *Principles of Psychological Assessment*. The goal of this book is to provide computational examples to apply principles of psychological assessment into practice."
url: 'https\://isaactpetersen.github.io/Principles-Psychological-Assessment/'
github-repo: isaactpetersen/Principles-Psychological-Assessment
cover-image: "Images/cover.png"
---
<!-- To add a comment, select the text you want to be a comment and press CTRL-SHIFT-C -->
<!---
Or for comment blocks,
do this.
-->
<!---
To do:
-margin/side notes
-code folding
-->
<!---
To include LaTeX code, see here:
https://bookdown.org/yihui/rmarkdown-cookbook/raw-latex.html
-->
<!---
To run chunk depending on whether it is HTML (including epub) or LaTeX/PDF, see here:
https://bookdown.org/yihui/rmarkdown-cookbook/latex-html.html
eval = knitr::is_html_output()
eval = knitr::is_latex_output()
-->
<!---
Display HTML in LaTeX/PDF:
https://bookdown.org/yihui/rmarkdown-cookbook/html-widgets.html
-->
<!---
Line breaks (https://stackoverflow.com/questions/33191744/how-to-add-new-line-in-markdown-presentation):
<br/>
\
two spaces at end of line
-->
<!---
Tables:
library("rmarkdown")
paged_table(data)
library("DT")
DT::datatable(data, options = list(scrollX = TRUE))
library("kable")
kable(data)
-->
<!---
Adding packages:
1. Add to relevant `.Rmd` file: library("packageName")
2. Add to `DESCRIPTION` file
3. Add to `packagesForBibliography` (below)
-->
```{r setup, include = FALSE}
knitr::opts_chunk$set(
message = FALSE, #don't show messages
warning = FALSE, #don't show warnings
error = TRUE, #do not interrupt generation in case of errors
echo = TRUE, #show R code
time_it = TRUE, #time code chunks
fig.align = "center",
dpi = 300,
comment = "", #for accessibility: https://bookdown.org/yihui/rmarkdown-cookbook/html-accessibility.html
dev = "png",
dev.args = list(type = "cairo-png")) #plot anti-aliasing using cairo-png
```
# Book Cover {-}
![book cover](Images/cover.png)
```{r include = FALSE}
# Working title:
# "Principles of Psychological Assessment: With Applied Examples in R"
# Time the code chunks
all_times <- list() # store the time for each chunk
knitr::knit_hooks$set(time_it = local({
now <- NULL
function(before, options) {
if (before) {
now <<- Sys.time()
} else {
res <- difftime(Sys.time(), now)
all_times[[options$label]] <<- res
}
}
}))
# Automatically create a bib database for R packages
packagesForBibliography <- c(
"bookdown", "knitr", "rmarkdown", "tidyverse", "readr", "here", "psych",
"MBESS", "rms", "lavaan", "semPlot", "semTools", "semPlot", "simsem",
"dagitty", "dmacs", "mirt", "mirtCAT", "blandr", "gtheory", "rockchalk",
"pROC", "ROCR", "ResourceSelection", "PredictABEL", "snow", "mice", "grid",
"gridExtra", "corrplot", "nFactors", "tinytex", "kableExtra", "DT", "tufte",
"servr", "MOTE", "Cairo", "irrCAC", "lme4", "simstandard", "MASS", "caret",
"randomForest", "elasticnet", "LiblineaR", "glmnet", "car", "latticeExtra",
"strucchange", "nonnest2", "ggrepel", "performance"
)
knitr::write_bib(c(
.packages(), packagesForBibliography
), 'packages_new.bib')
```