Skip to content

Commit

Permalink
Infra update
Browse files Browse the repository at this point in the history
  • Loading branch information
mvuorre committed Jun 26, 2024
1 parent 99f1c04 commit 465fc1c
Show file tree
Hide file tree
Showing 22 changed files with 2,444 additions and 1,467 deletions.
8 changes: 0 additions & 8 deletions .Renviron.example

This file was deleted.

1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@ _freeze/
*_files/
/cache/
/data/
model-ar1
Empty file added .nojekyll
Empty file.
15 changes: 15 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
all: renv docs

renv: renv.lock
Rscript -e "renv::restore()"

docs: index.qmd
quarto render

clean:
rm -rf *.pdf *.typ *.png *_cache/ *_files/ docs/

clean-hard:
rm -rf *.pdf *.typ *.png *_cache/ *_files/ docs/ cache/

.PHONY: all clean clean-hard
File renamed without changes.
35 changes: 12 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,43 +1,32 @@
# Introduction to latent means models in R


Repository for our manuscript discussing an
[R](https://cran.r-project.org/) and
[brms](https://cran.r-project.org/web/packages/brms/) implementation of
latent mean centering in multilevel models of longitudinal psychological
data.
Repository for our manuscript discussing an [R](https://cran.r-project.org/) and [brms](https://cran.r-project.org/web/packages/brms/) implementation of latent mean centering in multilevel models of longitudinal psychological data.

- Repo on GitHub: <https://github.com/mvuorre/latent-mean-centering-ms>
- Repo on GitHub: <https://github.com/mvuorre/funky-firefly>
- Archived repo: tbd
- Online: tbd
- preprint: tbd

## Reproduce

Everything is coded in [R](https://cran.r-project.org/) and bunched
together as a [Quarto](https://quarto.org/) website. To reproduce, clone
the repo and render the Quarto documents:
To reproduce, download our materials, restore the R environment (renv) and knit `ms.Rmd`.

In terminal:

``` bash
# Download materials
git clone https://github.com/mvuorre/latent-mean-centering-ms.git
cd latent-mean-centering-ms
git clone https://github.com/mvuorre/funky-firefly.git

# Set up R environment
Rscript -e 'renv::restore(prompt = FALSE)'
# Enter directory
cd funky-firefly

# Modify environment variables in .Renviron.example & rename it to .Renviron
# (Optional) modify .Renviron.example & rename it to .Renviron

# Run code and render outputs
quarto render
# Run code and produce outputs
make
```

Once the computations are finished (this will take a long time depending
on your computer) the rendered documents are in `docs/`.

## Contribute

Contributions preferably via pull requests. You can also grab the
rendered manuscript (Word, PDF) from the latest
[release](https://github.com/mvuorre/latent-mean-centering-ms/releases)
for comments & edits.
Contributions preferably via pull requests. You can also grab the rendered manuscript (Word, PDF) from the latest [release](https://github.com/mvuorre/latent-mean-centering-ms/releases) for comments & edits.
35 changes: 0 additions & 35 deletions README.qmd

This file was deleted.

14 changes: 14 additions & 0 deletions _extensions/mvuorre/preprint/_extension.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
title: Preprint
author: Matti Vuorre
version: 0.9.0
quarto-required: ">=1.5.47"
contributes:
formats:
typst:
template-partials:
- typst-template.typ
- typst-show.typ
format-resources:
- '*.svg'
docx:
reference-doc: preprint.docx
17 changes: 17 additions & 0 deletions _extensions/mvuorre/preprint/orcid.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions _extensions/mvuorre/preprint/psyarxiv.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
108 changes: 108 additions & 0 deletions _extensions/mvuorre/preprint/typst-show.typ
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
#show: doc => preprint(
$if(title)$
title: [$title$],
$endif$
$if(running-head)$
running-head: [$running-head$],
$endif$
$if(by-author)$
authors: (
$for(by-author)$
$if(it.name.literal)$
( name: [$it.name.literal$],
affiliation: [$for(it.affiliations)$$it.id$$sep$, $endfor$],
$if(it.orcid)$orcid: "https://orcid.org/$it.orcid$",$endif$
$if(it.email)$email: [$it.email$]$endif$),
$endif$
$endfor$
),
$endif$
$if(affiliations)$
affiliations: (
$for(affiliations)$(
id: "$it.id$",
name: "$it.name$",
$if(it.department)$department: "$it.department$"$endif$
),
$endfor$
),
$endif$
$if(date)$
date: [$date$],
$endif$
$if(leading)$
leading: $leading$,
$endif$
$if(branding)$
branding: "$branding$",
$endif$
$if(spacing)$
spacing: $spacing$,
$endif$
$if(linkcolor)$
linkcolor: $linkcolor$,
$endif$
$if(citation)$
citation: (
type: "$citation.type$",
container-title: "$citation.container-title$",
doi: "$citation.doi$",
url: "$citation.url$"
),
$endif$
$if(authornote)$
authornote: [$authornote$],
$endif$
$if(lang)$
lang: "$lang$",
$endif$
$if(region)$
region: "$region$",
$endif$
$if(abstract)$
abstract: [$abstract$],
$endif$
$if(keywords)$
keywords: [$for(keywords)$$it$$sep$, $endfor$],
$endif$
$if(margin)$
margin: ($for(margin/pairs)$$margin.key$: $margin.value$,$endfor$),
$endif$
$if(papersize)$
paper: "$papersize$",
$endif$
$if(mainfont)$
font: ("$mainfont$",),
$endif$
$if(fontsize)$
fontsize: $fontsize$,
$endif$
$if(section-numbering)$
section-numbering: "$section-numbering$",
$endif$
$if(toc)$
toc: $toc$,
$endif$
$if(toc_depth)$
toc_depth: $toc_depth$,
$endif$
$if(toc_title)$
toc_title: "$toc_title$",
$endif$
$if(toc_indent)$
toc_indent: "$toc_indent$",
$endif$
$if(columns)$
cols: $columns$,
$endif$
$if(col-gutter)$
col-gutter: $col-gutter$,
$endif$
$if(bibliography-style)$
bibliography-style: [$bibliography-style$],
$endif$
$if(bibliography-title)$
bibliography-title: [$bibliography-title$],
$endif$
doc,
)
Loading

0 comments on commit 465fc1c

Please sign in to comment.