Provides 'RStudio' add-ins and helper functions for converting the current editor line, or a supplied character string, into formatted section titles for 'R' scripts. When used as an add-in, it uses 'rstudioapi' to read the active document context and replace only the selected line, so users can bind the add-ins to keyboard shortcuts. The formatter trims common comment and heading markers, converts the label to uppercase, and renders three styles: a five-line boxed title, a framed subtitle, and a simple inline header. Generated titles are padded or centered to a configurable width, using the package-specific width option when set and the session display width otherwise, which helps keep analysis scripts visually consistent and easier to navigate.
bolder is a small RStudio add-in package for turning the current editor line into clean section headers for scripts.
Write a word or phrase, click the line, press a keyboard shortcut, and bolder replaces that line with an uppercase section title.
data cleaning
Title:
###############################################################
###############################################################
######################## DATA CLEANING ########################
###############################################################
###############################################################
Subtitle:
###############################################################
#---------------------- DATA CLEANING ------------------------#
###############################################################
Simple:
# DATA CLEANING -----------------------------------------------
Install the released version from CRAN:
install.packages("bolder")
library(bolder)
Restart RStudio after installing.
Configure shortcuts manually in RStudio:
Tools > Modify Keyboard Shortcuts
Search for bolder and assign your preferred shortcuts.
Suggested shortcuts:
Ctrl+B: bolder - SimpleCtrl+Shift+B: bolder - SubtitleCtrl+Alt+B: bolder - TitleIn an .R script, write a word or phrase:
final model
Click that line and press one of the shortcuts.
You can also run the add-ins from the RStudio Addins menu:
bolder - Simplebolder - Subtitlebolder - TitleBy default, bolder uses getOption("width") to decide how wide the generated title should be.
To set a custom width:
options(bolder.width = 90)
To make that width permanent, add the same line to your .Rprofile.
If the shortcuts do not appear or do not work:
Tools > Modify Keyboard Shortcuts.bolder.If one of the shortcuts is already used by RStudio, choose another shortcut that includes B.
Check the package locally with:
devtools::check()
Or from a terminal:
R CMD check --no-manual bolder