Skip to content

Instantly share code, notes, and snippets.

View davebraze's full-sized avatar

Dave Braze davebraze

View GitHub Profile
@davebraze
davebraze / shiny-notes.md
Created May 4, 2023 13:46
Shiny, Random notes

UI oriented helpers for shiny apps

  • {shiny.router} Basic Routing for Shiny Web Applications
  • {shinydashboard} Create Dashboards with 'Shiny'
  • {shinydashboardPlus} Add More 'AdminLTE2' Components to 'shinydashboard'
  • {bs4Dash} A 'Bootstrap 4' Version of 'shinydashboard'
  • {designer} 'Shiny' UI Prototype Builder
  • {gfonts} Offline 'Google' Fonts for 'Markdown' and 'Shiny'
  • {mwshiny} 'Shiny' for Multiple Windows
  • {prompter} Add Tooltips in 'Shiny' Apps with 'Hint.css'
  • {shidashi} A Shiny Dashboard Template System
;; cribbed from: https://www.reddit.com/r/emacs/comments/yojd70/state_of_esseglot/
;;
;; also see:
;; https://github.com/minad/corfu/wiki#configuring-corfu-for-eglot
;; https://github.com/minad/corfu/wiki#using-cape-to-tweak-and-combine-capfs
(use-package eglot
:defer t
:commands (eglot eglot-ensure)
@davebraze
davebraze / student-info-system-foss.md
Created August 3, 2022 17:30
Starting list of student infor systems (FOSS)
@davebraze
davebraze / rmarkdown-notes.md
Last active January 7, 2022 19:56
Rmarkdown Notes

Knitr options

These are the global knitr options I use for most documents. They get set in the very first code chunk of each doc. The out_type bit is there to tailor the output device to the particular type of document being created.


out_type <- "other"
if (knitr::is_html_output()) {
    out_type <- "html"
} else if (knitr::is_latex_output()) {
    out_type <- "pdf"
@davebraze
davebraze / summary-tools-rtstats.md
Last active October 10, 2021 22:12
rstats summary tools for data.frame

skimr::skim_without_charts(df) ## I like this best

Hmisc::describe(df) ## type agnostic

summarytools::dfSummary(df) ## similar to Hmisc::describe

base::summary(df) ## best with numeric variables

psych::describe(df) ## best with numeric variables

@davebraze
davebraze / emacs-data-work.md
Last active March 26, 2024 21:49
On using Emacs for data work with R

I use GNU Emacs on MS Windows 11, specifically, the pre-packaged pre-compiled distributions for Windows provided by Vince Goulet (https://vigou3.gitlab.io/emacs-modified-windows/). He also provides a bundle for MacOS (https://vigou3.gitlab.io/emacs-modified-macos/). I have used, and occassionally still use, Emacs on a variety of different unixen. I believe most of what follows will apply to any GNU Emacs distribution or derivative on any platform, but of course, YMMV.

By way of background, I've been using Emacs since the late 80s as an IDE for various programming languages (e.g., pascal, C, lisp, matlab, python), and as a general text editor. I've also got a lot of mileage out of it's features for calendaring, scheduling, note-taking, and agenda making. So, when I started using R around 2001, it was natural to do my R scripting and programming in Emacs (using its ESS package, which I'd already been using with SAS since the early 90s). When RStudio came out in about 2011, I did give it a look, but it was

// https://www.zotero.org/support/dev/client_coding/javascript_api
// My immediate goal is to batch edit Zotero tags. Things I'd like to be able to do include:
// o normalize case (e.g., make all tags lower case)
// o remove extraneous characters from beginning or end of tags (e.g., "*" or ",")
// o get a list of tags used exactly once (save to file)
// run synchronously
var zp = Zotero.getActiveZoteroPane();
@davebraze
davebraze / fixation-plot.R
Created March 6, 2021 19:33
Plot Fixations (gaze data), as for pre-analytic screening
library(tidyverse)
library(ggplot2)
library(cowplot)
## make some data. Assume display screen stimulus display of 1024x768
n <- 2000 # n fixations
lx <- 512-200
rx <- 512+200
cx <- 512
---
title: Auto Numbering Figures and Tables
subtitle: Rmarkdown
author: David Braze
email: davebraze@gmail.com
date: "`r format(Sys.time(), '%B %d, %Y')`"
fontsize: 11pt
geometry: margin=1in
header-includes:
@davebraze
davebraze / week04.org
Created November 6, 2019 16:02 — forked from tmalsburg/week04.org
Sample org file for teaching slides

Foundations of Math

Agenda for today