Skip to content

Instantly share code, notes, and snippets.

@friendly
friendly / determinant_distribition.R
Created November 17, 2025 02:08
Distribution of Determinants of 3×3 Matrices
---
title: "Distribution of Determinants of 3×3 Matrices from {1,2,...,9}"
author: "Michael Friendly"
date: "`r Sys.Date()`"
output:
html_document:
toc: true
toc_float: true
code_folding: show
theme: united
@friendly
friendly / fix_roxygen_items.R
Created December 9, 2025 22:36
Functions to fix one of the awful things that `Rd2roxygen::Rd2roxygen()` does when converting a package
#!/usr/bin/env Rscript
# Functions to fix one of the awful things that `Rd2roxygen::Rd2roxygen()` does when it tries to convert
# a package to use roxygen documentation
#
# * Fixes roxygen2 \item formatting used in \describe{} blocks to document arguments and elements of returned results
# * Changes \item{list("VarName")} to \item{\code{VarName}}
#
# Usage:
# From R: source("fix_roxygen_items.R"); fix_roxygen_items("R/data.R")