Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View mvuorre's full-sized avatar
🐢

Matti Vuorre mvuorre

🐢
View GitHub Profile
---
title: "Math in kableExtra HTML tables"
format: html
author: Matti Vuorre
---
I want to output math in {[kableExtra](https://github.com/haozhu233/kableExtra)} HTML tables in a Quarto document. I can do it but have to use `cat()`. However if I use `cat()` I can't cross reference. Any ideas? [gist here](https://gist.github.com/mvuorre/3663f6be89f3ab029a28798f8ea7b9a4). [Output here](https://matti.quarto.pub/math-in-kableextra-html-tables/).
```{r}
#| message: false
@mvuorre
mvuorre / rocs.Rmd
Created October 7, 2022 10:59
yolo some ROC plots from a brmsfit
---
title: "Untitled"
output: html_document
---
Good luck trying to use this for anything!
```{r setup, include=FALSE}
library(brms)
library(patchwork)
@mvuorre
mvuorre / macos-rstats-laptop-setup.md
Last active December 21, 2021 08:37 — forked from gadenbuie/macos-rstats-laptop-setup.md
Setting up a macOS computer for work and play

New apple computer setup

This file describes how I set up an apple computer with the tools I like and use. This tries to be succinct and quick, using homebrew to install as much as possible from the command line.

Apps

  1. Fire up the terminal and install homebrew

Then go ahead and install these apps with homebrew (I have no idea what --cask does but it seems necessary for some)

Keybase proof

I hereby claim:

  • I am mvuorre on github.
  • I am vuorre (https://keybase.io/vuorre) on keybase.
  • I have a public key ASDLX-I92a682H-zmzMjJb27MJhz9JLL4KHgADCv20keZgo

To claim this, I am signing this object:

@mvuorre
mvuorre / git-clearHistory
Last active June 1, 2019 14:26 — forked from stephenhardy/git-clearHistory
Steps to clear out the history of a git/github repository
-- Delete .git folder from disk
rm -rf .git
-- recreate the repo from the current content only (note old .gitignore is preserved)
git init
git add .
git commit -m "Initial commit"
-- push to the github remote repo ensuring you overwrite history
git remote add origin https://github.com/<username>/<reponame>.git
library(ggplot2)
theme_spss <- function(base_family = "Helvetica") {
theme(text = element_text(family = base_family, face = "bold"),
axis.ticks = element_line(colour = "black", size = 1),
panel.background = element_rect(colour = "black",
fill = "gray90", size = 1.5),
panel.grid = element_blank(),
aspect.ratio = 1)
}
@mvuorre
mvuorre / multilevel_logistic_stan
Last active August 29, 2015 14:21
Multilevel logistic regression in STAN
// random effects covariances from
// https://github.com/vasishth/StanJAGSexamples/blob/master/FrankEtAlCogSci2015/FTVCogSciProficiency.Stan
data {
int<lower=1> N; // Number of observations
int<lower=1> J; // Number of subjects
int<lower=1> K; // Number of predictors
int<lower=1,upper=J> id[N]; // Subject ids
real xInt[N]; // ISI vector
real<lower=-0.5,upper=0.5> xCond[N]; // Condition vector
A practical guide to hosting slidify slides on github as part of a project.
1. Create a project repository and clone it to your computer ('awesome_project/')
2. Create a gh-pages branch
3. R:
setwd('awesome_project/')
author('project_slideshow', use_git=F)
6. Create slideshow with R-Markdown, then slidify('index.Rmd')
7. Push content into the project's gh-pages
8. <username.github.io/awesome_project/project_slideshow/index.html>