<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>localhost.pbcopy</string>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| stylus: | |
| compress: true | |
| path: ./path/to/styl |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| title: "Auto-numbering and cross-referencing of figures and tables in rmarkdown" | |
| output: html_document | |
| --- | |
| NOTE: I recommend using the bookdown package and `output: html_document2` to make captions and cross-references more easily than the method described below. | |
| TODO: check this out: https://github.com/adletaw/captioner | |
| Here's how to use: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| data { | |
| int<lower=1> N; // Number of samples | |
| int<lower=1> M; // Number of dimensions | |
| int<lower=1> K; // Number of mixtures. Set to 1,000 at the moment. | |
| vector[M] y[N]; // Vector containing the NxM dimensional data | |
| vector<lower=0>[K] alpha; // Parameter for Dirichlet prior. Set to 1.0/K in list of length K. | |
| } | |
| parameters { | |
| simplex[K] theta; // Mixing proportions |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require(ggplot2) | |
| require(gridExtra) | |
| saveChart <- function(chart, fileName) { | |
| # Draw attribution. | |
| chart <- chart + geom_text(aes(label = 'sentimentview.com', x = 2.5, y = 0), hjust = -2, vjust = 6, color="#a0a0a0", size=3.5) | |
| # Disable clip-area. | |
| gt <- ggplot_gtable(ggplot_build(chart)) | |
| gt$layout$clip[gt$layout$name == "panel"] <- "off" |
When you use knit_expand it appears that the inclusion of the Rmd is done on the first pass, and then the complete document evaluated. This means that a Rmd block referenced in loop with knit_expand will only evaluate changing variables at their last value.
This can be worked around by passing the literal value of the variable at the time of the knit_expand with {{var}} syntax.
This is documented in the knitr_expand docs, but less clear (to an R noob like me) for embedded documents rather than strings.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM ubuntu | |
| RUN apt update \ | |
| && apt install -y firefox \ | |
| openssh-server \ | |
| xauth \ | |
| && mkdir /var/run/sshd \ | |
| && mkdir /root/.ssh \ | |
| && chmod 700 /root/.ssh \ | |
| && ssh-keygen -A \ | |
| && sed -i "s/^.*PasswordAuthentication.*$/PasswordAuthentication no/" /etc/ssh/sshd_config \ |
library(tidyverse)
library(broom)
library(lme4)
set.seed(1234)
# Make fake data
# 2x2x2 factorial design
df <- tibble(id = 1:1000, OlderNewer