R notes
Working notes, code snippets, and analysis walkthroughs.
Notes are rendered from the same .qmd sources I actually work in, so the code shown is the code that ran. Every page includes a “Code” menu in the top right for viewing or downloading the source.
| Updated | Title | What it covers | Tags |
|---|
No matching items
NoteAdding a note
Drop a .qmd into notes/ (subfolders are fine) with a header like:
---
title: "Ordinal regression with rms::orm"
description: "Fitting, validating, and plotting partial effects for a PRO endpoint."
date: last-modified
categories: [rms, ordinal, validation]
---Then quarto render. The listing picks it up.
Plain .R scripts aren’t rendered by Quarto. Two options:
- Add
#'roxygen-style comments and runknitr::spin("script.R", knit = FALSE)once to convert it to a.qmdyou can edit from then on. - Leave it as a script, list
notes/**/*.Runderresources:in_quarto.yml, and link to it from a note page so it downloads.
Data files referenced by a note must live inside the project — Quarto won’t reach outside the project root. Put them in notes/data/ and read them with a path relative to the project root, since execute-dir: project is set.