MyNixOS website logo
Description

'RStudio' Add-Ins for Formatted Section Titles.

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

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

Styles

Title:

###############################################################
###############################################################
######################## DATA CLEANING ########################
###############################################################
###############################################################

Subtitle:

###############################################################
#---------------------- DATA CLEANING ------------------------#
###############################################################

Simple:

# DATA CLEANING -----------------------------------------------

Installation

Install the released version from CRAN:

install.packages("bolder")
library(bolder)

Restart RStudio after installing.

Keyboard Shortcuts

Configure shortcuts manually in RStudio:

Tools > Modify Keyboard Shortcuts

Search for bolder and assign your preferred shortcuts.

Suggested shortcuts:

  • Ctrl+B: bolder - Simple
  • Ctrl+Shift+B: bolder - Subtitle
  • Ctrl+Alt+B: bolder - Title

Usage

In 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 - Simple
  • bolder - Subtitle
  • bolder - Title

Width

By 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.

Troubleshooting

If the shortcuts do not appear or do not work:

  1. Close all RStudio windows.
  2. Open RStudio again.
  3. Go to Tools > Modify Keyboard Shortcuts.
  4. Search for bolder.

If one of the shortcuts is already used by RStudio, choose another shortcut that includes B.

Development

Check the package locally with:

devtools::check()

Or from a terminal:

R CMD check --no-manual bolder
Metadata

Version

0.1.1

License

Unknown

Platforms (80)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    uefi
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-uefi
  • aarch64-windows
  • aarch64_be-none
  • arc-linux
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-linux
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • sh4-linux
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-uefi
  • x86_64-windows