Skip to content

Instantly share code, notes, and snippets.

View RaymondBalise's full-sized avatar

Raymond R. Balise, PhD RaymondBalise

View GitHub Profile
@RaymondBalise
RaymondBalise / .gitignore
Last active May 20, 2024 10:29
.gitignore allowing R projects
# Version 2024-05-18
# History files
.Rhistory
.Rapp.history
# Session Data files
.RData
*.RData
.RDataTmp
@RaymondBalise
RaymondBalise / analysis_with_example.qmd
Last active March 7, 2024 19:21
Quarto Analysis with Examples
---
title: "your_title_goes_here"
author: "your_name_goes_here"
date: last-modified
format:
html:
self-contained: true
knitr:
opts_chunk: ############ set global options ############
collapse: true # keep code from blocks together (if shown)
@RaymondBalise
RaymondBalise / analysis_with_example.Rmd
Last active March 7, 2024 19:37
R Markdown Analysis With Example
---
title: "your_title_goes_here"
author: "your_name_goes_here"
date: "`r Sys.Date()`"
output:
bookdown::html_document2:
number_sections: false
bibliography: [references.bib, packages.bib]
csl: the-new-england-journal-of-medicine.csl
---
@RaymondBalise
RaymondBalise / README.md
Created July 27, 2023 14:51
This is a README file for analysis projects - The DATED_PROGRESS_NOTES.md is in another GIST

Repository Name

PI: add contact info if the repo is private.

Code Authors:

Description: Follow the name with a brief description of what the project does. Say the source of the data. If the data is public add reference here.

Notes: The progress notes are here DATED_PROGRESS_NOTES.md.

@RaymondBalise
RaymondBalise / load_r_packages.R
Last active February 13, 2024 14:19
Code to load the packages that I use for teaching
if("remotes" %in% rownames(installed.packages()) == FALSE) {install.packages("remotes")}
remotes::install_cran(
c(
"aplore3", "arrow",
"babynames", "bookdown", "blogdown", "broom.mixed",
"car", "caret", "clipr", "conflicted", "C50",
"data.table", "describedata", "devtools", "DiagrammeR", "discrim", "distill", "doParallel", "DT",
"feather", "flextable", "flipbookr", "forestplot", "fst",
"gapminder", "gee", "GGally", "ggbeeswarm", "ggforce", "ggrepel", "ggthemes", "gh", "gitcreds", "glmnet", "globals", "gt", "gtsummary",
"haven", "here", "hexbin", "hexView",
@RaymondBalise
RaymondBalise / RStudio markdown snippets
Last active February 15, 2024 15:34
There are Markdown code snippets for the RStudio IDE. Click the Tools > Global Options... menu; then click the code Code windowpane; then click the Edit Snippets... button; then click the Markdown windowpane; go to the bottom and paste this gist.
# 2024-02-15
# quarto callout note
snippet con
:::{.callout-note appearance=minimal}
${1:text}
:::
# quarto callout tip
snippet cot
@RaymondBalise
RaymondBalise / analysis.Rmd
Last active March 7, 2024 20:04
Analysis R Markdown Format
---
title: "your_title_goes_here"
author: "your_name_goes_here"
date: "`r Sys.Date()`"
output:
bookdown::html_document2:
number_sections: false
bibliography: [references.bib, packages.bib]
csl: the-new-england-journal-of-medicine.csl
---
@RaymondBalise
RaymondBalise / analysis.qmd
Last active March 7, 2024 20:06
Analysis Quarto Format
---
title: "your_title_goes_here"
author: "your_name_goes_here"
date: "`r Sys.Date()`"
format:
html:
self-contained: true
knitr:
opts_chunk: ########## set global options ############
collapse: true # keep code from blocks together (if shown)
@RaymondBalise
RaymondBalise / RStudio snippets.R
Last active October 21, 2023 01:55
Autocomplete Snippets for RStudio
# version 2022-08-23
snippet lib
library(${1:package})
snippet req
require(${1:package})
snippet src
source("${1:file.R}")
@RaymondBalise
RaymondBalise / 99_rmarkdown.Rmd
Last active February 15, 2022 19:16
RMarkdown Latex Notes
# Appendix {.unnumbered #latex}
Ray's Formatting Notes: version 2021-02-15
https://gist.github.com/RaymondBalise/ee4b7da0a70087317dc52bf479a4e2b6
```{=html}
<style>
.col2 {
columns: 2 150px; /* number of columns and width in pixels*/
-webkit-columns: 2 150px; /* chrome, safari */