Package {bolder}


Title: 'RStudio' Add-Ins for Formatted Section Titles
Version: 0.1.1
Description: 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.
License: MIT + file LICENSE
Encoding: UTF-8
Imports: rstudioapi
NeedsCompilation: no
Packaged: 2026-05-13 11:15:28 UTC; User
Author: Gabriel Curti [aut, cre]
Maintainer: Gabriel Curti <freitascurti@usp.br>
Repository: CRAN
Date/Publication: 2026-05-18 18:40:22 UTC

Format a bolder title

Description

Formats text using the bolder title styles.

Usage

bolder_format_title(
  text,
  level = c("title", "subtitle", "simple"),
  width = bolder_width()
)

Arguments

text

Text to format as a title.

level

Title level: title, subtitle, or simple.

width

Total title width. Defaults to getOption("bolder.width") when set, otherwise getOption("width").

Details

Set options(bolder.width = 90) to customize the generated title width for addins and direct calls that use the default width argument.

Value

A character string containing the formatted title.

Examples

bolder_format_title("base de dados", "title")
bolder_format_title("base de dados", "subtitle")
bolder_format_title("base de dados", "simple")

Create a simple bolder title

Description

RStudio addin that replaces the current editor line with a simple inline bolder title.

Usage

bolder_simple()

Value

Invisibly returns the generated replacement string. Called for the side effect of replacing the current editor line in RStudio.


Create a bolder subtitle

Description

RStudio addin that replaces the current editor line with a centered bolder subtitle.

Usage

bolder_subtitle()

Value

Invisibly returns the generated replacement string. Called for the side effect of replacing the current editor line in RStudio.


Create a bolder title

Description

RStudio addin that replaces the current editor line with a centered bolder title.

Usage

bolder_title()

Value

Invisibly returns the generated replacement string. Called for the side effect of replacing the current editor line in RStudio.