Skip to content

Instantly share code, notes, and snippets.

View davebraze's full-sized avatar

Dave Braze davebraze

View GitHub Profile
@davebraze
davebraze / alt-ide-rstats.md
Last active October 28, 2021 18:27
Alternative IDEs for RStats

The RStudio integrated development environment (IDE) was first released in 2011. The goals of its creators, so far as I can tell, were these. First, they wanted to provide a better R coding experience than could be had through the bare-bones text editor that shipped with R itself. They also wanted to take into account the fact that many new users of R had no previous programming experience, and so had no familiarity with the kinds of tools that support efficient coding workflows. The RStudio IDE was intended to provide a relatively simple unified interface to R, its command line, help system, and plots. It eventually expanded to include limited interfaces to command line utilities like (e.g.,) git and pandoc, which can usefully supplement an R based workflow. Importantly, RStudio was geared toward novice programmers who might be coding only in R.

That said, there are other IDEs that will get the job done. Many of these are more general purpose tools, supporting a number of programming languages beyond R (as

@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

---
title: Auto Numbering Figures and Tables
subtitle: Rmarkdown
author: David Braze
email: [email protected]
date: "`r format(Sys.time(), '%B %d, %Y')`"
fontsize: 11pt
geometry: margin=1in
header-includes:
@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
// 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 / emacs-data-work.md
Last active July 17, 2025 16:01
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

@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 / 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 / student-info-system-foss.md
Created August 3, 2022 17:30
Starting list of student infor systems (FOSS)
;; 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)