Skip to content
Merged
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Ignore for publishing
/.quarto/
/_site/
# Ignore the rendered files but keep the directory
/docs/*
!docs/.keep

.Rhistory
.Rprofile
Expand Down
7 changes: 3 additions & 4 deletions 08-Appendix.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ s1e_heart_plot

I also explored whether participants reported different levels of need-threat between Time 3 and Time 5. Results are plotted in @fig-s1e-nts-across-time-plot.

```{r s1e-exploratory-NTS-mixed, cache=TRUE}
```{r s1e-exploratory-NTS-mixed}
# Exploratory Mixed Model with Time --------------------------------------------
# run model
NTS_vars <- c("nts_belonging_mean", "nts_esteem_mean",
Expand Down Expand Up @@ -691,7 +691,7 @@ s2_mnsdcor %>% as_tibble() %>%
```

#### Bivariate Scatter Plot Matrix
```{r s2-matplot, fig.cap = "Matrix Plot for Study 2 Variables", fig.height=15, fig.width=15, message=FALSE, warning=FALSE, cache=TRUE}
```{r s2-matplot, fig.cap = "Matrix Plot for Study 2 Variables", fig.height=15, fig.width=15, message=FALSE, warning=FALSE}
#| label: fig-s2-matplot
# Study 2 - Matrix Plot
s2_df %>%
Expand Down Expand Up @@ -908,8 +908,7 @@ s3_mnsdcor %>% as_tibble() %>%
kable_styling_cortable()
```

```{r appendix-s3-ggpairs, fig.cap='Study 3 - Bivariate Scatter Plot Matrix',fig.height=15, fig.width=15, out.width='100%', message=FALSE, warning=FALSE, cache=TRUE}
#| label: fig-appendix-s3-ggpairs
```{r appendix-s3-ggpairs, fig.cap='Study 3 - Bivariate Scatter Plot Matrix',fig.height=15, fig.width=15, out.width='100%', message=FALSE, warning=FALSE}
# GG Pairs for Study 3
s3_df %>%
dplyr::select(parasocial, social_world, T1_Heart_1, T1_Valence_1, T1_Arousal_1, T1_Dominance_1,
Expand Down
117 changes: 36 additions & 81 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,87 +1,42 @@
FROM rocker/rstudio:4

# Install Ubuntu distributions of R Packages
RUN apt-get update
RUN apt-get install -y zlib1g-dev
RUN
RUN install2.r -e here
RUN install2.r -e haven

# xml2
RUN apt-get install -y libxml2-dev
RUN install2.r -e xml2

# svg lite
RUN apt-get -y install libfontconfig1-dev
RUN install2.r -e svglite

RUN install2.r -e patchwork
RUN install2.r -e table1
RUN install2.r -e papaja
RUN install2.r -e kableExtra
RUN install2.r -e tidyr
RUN install2.r -e tibble

RUN install2.r -e bookdown


RUN install2.r -e remotes
# ggtext
RUN apt-get -y install libcurl4-openssl-dev
RUN install2.r -e ggtext
RUN install2.r -e labelled

# Install R packages on GitHub
RUN Rscript -e "remotes::install_github('achetverikov/APAstats')"
FROM rocker/rstudio:4.4.2

# Install renv
RUN R -e "install.packages('renv', repos = c(CRAN = 'https://cloud.r-project.org'))"

RUN install2.r -e readr
RUN install2.r -e stringr
RUN install2.r -e purrr
RUN install2.r -e tinytex
# Get the renv files from the current project
RUN mkdir -p /project
WORKDIR /project
COPY renv.lock renv.lock

# Specify library paths for installation
RUN mkdir -p renv
COPY renv/activate.R renv/activate.R
COPY renv/settings.json renv/settings.json

RUN apt-get -y install libcairo2-dev libharfbuzz-dev libfribidi-dev
RUN apt-get -y install libfreetype6-dev libpng-dev libtiff5-dev libjpeg-dev
RUN install2.r -e flextable
RUN install2.r -e metathis
RUN install2.r -e Hmisc
RUN install2.r -e GGally
RUN install2.r -e corrr

RUN apt-get -y install cmake
RUN install2.r -e lme4

RUN install2.r -e lmerTest
RUN install2.r -e forestplot
RUN install2.r -e broom.mixed
RUN install2.r -e ggpubr
RUN install2.r -e pacman

RUN install2.r -e tidyverse
RUN install2.r -e rio

RUN install2.r -e english
RUN install2.r -e sjlabelled
RUN install2.r -e sjPlot
RUN install2.r -e ggh4x
RUN install2.r -e knitcitations


RUN install2.r -e wordcloud
RUN install2.r -e emmeans
RUN install2.r -e tidytext
RUN install2.r -e ggmosaic
RUN install2.r -e broom
RUN install2.r -e codebook
RUN install2.r -e effectsize
# Install system dependencies
RUN apt-get update
## xml2
RUN apt-get install -y libxml2-dev
## png
RUN apt-get install -y libpng-dev
## curl
RUN apt-get install -y libcurl4-openssl-dev
## cmake (for nloptr)
RUN apt-get install -y cmake
## gert
RUN apt-get install -y libgit2-dev
## systemfonts
RUN apt-get install -y libfontconfig1-dev
## Other dependencies
RUN apt-get install -y libcairo2-dev libharfbuzz-dev libfribidi-dev
RUN apt-get install -y libfreetype6-dev libtiff5-dev libjpeg-dev

# Restore the packages via renv
RUN R -e "renv::restore()"

# Install knitr and rmarkdown packages
RUN R -e "install.packages('knitr', repos = c(CRAN = 'https://cloud.r-project.org'))"
RUN R -e "install.packages('rmarkdown', repos = c(CRAN = 'https://cloud.r-project.org'))"

# Install tinytex as the rstudio user
USER rstudio
RUN Rscript -e "tinytex::install_tinytex(force = TRUE)"
ENV PATH="${PATH}:/home/rstudio/bin"

# Start the RStudio server as root
USER root
ENV USER=rstudio
CMD ["/usr/lib/rstudio-server/bin/rserver","--server-daemonize=0","--auth-none=1"]
RUN Rscript -e "tinytex::install_tinytex(force = TRUE)"
17 changes: 14 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,17 @@ services:
- 8787:8787
volumes:
- ./:/home/rstudio/dissertation/
environment:
- PASSWORD=changeme # default username is rstudio

working_dir: /home/rstudio/dissertation
command: quarto render # Render the book
## To launch RStudio server use the command & environment below
## -------------------------
# user: root # For launching RStudio server
# command:
# [
# "/usr/lib/rstudio-server/bin/rserver",
# "--server-daemonize=0",
# "--auth-none=1",
# ]
# environment:
# - PASSWORD=changeme # default username is rstudio
# - USER=root # For launching RStudio server
Empty file added docs/.keep
Empty file.
40 changes: 1 addition & 39 deletions packages.bib
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
@Manual{R-apastats,
title = {apastats: APA-style results},
author = {Andrey Chetverikov},
year = {2025},
note = {R package version 0.5, commit acbf761e3f66643c96e9b6ad65fdcd4af01382ed},
url = {https://github.com/achetverikov/APAstats},
year = {2025},
}

@Manual{R-base,
Expand Down Expand Up @@ -174,14 +174,6 @@ @Manual{R-lme4
url = {https://github.com/lme4/lme4/},
}

@Manual{R-lubridate,
title = {lubridate: Make Dealing with Dates a Little Easier},
author = {Vitalie Spinu and Garrett Grolemund and Hadley Wickham},
year = {2024},
note = {R package version 1.9.4},
url = {https://lubridate.tidyverse.org},
}

@Manual{R-Matrix,
title = {Matrix: Sparse and Dense Matrix Classes and Methods},
author = {Douglas Bates and Martin Maechler and Mikael Jagan},
Expand Down Expand Up @@ -253,14 +245,6 @@ @Manual{R-tidytext
url = {https://juliasilge.github.io/tidytext/},
}

@Manual{R-tidyverse,
title = {tidyverse: Easily Install and Load the Tidyverse},
author = {Hadley Wickham},
year = {2023},
note = {R package version 2.0.0},
url = {https://tidyverse.tidyverse.org},
}

@Manual{R-wordcloud,
title = {wordcloud: Word Clouds},
author = {Ian Fellows},
Expand Down Expand Up @@ -333,17 +317,6 @@ @Article{lme42015
doi = {10.18637/jss.v067.i01},
}

@Article{lubridate2011,
title = {Dates and Times Made Easy with {lubridate}},
author = {Garrett Grolemund and Hadley Wickham},
journal = {Journal of Statistical Software},
year = {2011},
volume = {40},
number = {3},
pages = {1--25},
url = {https://www.jstatsoft.org/v40/i03/},
}

@Article{tidytext2016,
title = {tidytext: Text Mining and Analysis Using Tidy Data Principles in R},
author = {Julia Silge and David Robinson},
Expand All @@ -356,14 +329,3 @@ @Article{tidytext2016
journal = {JOSS},
}

@Article{tidyverse2019,
title = {Welcome to the {tidyverse}},
author = {Hadley Wickham and Mara Averick and Jennifer Bryan and Winston Chang and Lucy D'Agostino McGowan and Romain François and Garrett Grolemund and Alex Hayes and Lionel Henry and Jim Hester and Max Kuhn and Thomas Lin Pedersen and Evan Miller and Stephan Milton Bache and Kirill Müller and Jeroen Ooms and David Robinson and Dana Paige Seidel and Vitalie Spinu and Kohske Takahashi and Davis Vaughan and Claus Wilke and Kara Woo and Hiroaki Yutani},
year = {2019},
journal = {Journal of Open Source Software},
volume = {4},
number = {43},
pages = {1686},
doi = {10.21105/joss.01686},
}

Loading