Snorkel
:diving_mask::label: R package: RStudio Addin to help document functions with {roxygen2}
Install / Use
/learn @matt-dray/SnorkelREADME
{snorkel}
<!-- badges: start --> <!-- badges: end -->An R package containing an RStudio Addin to help you insert R Documentation (Rd) markup to your package's function documentation.
You put a snorkel in your mouth to help you breathe oxygen; you put a {snorkel} in your Addins to help you prepare documentation with {roxygen2}.
Install
Install from Github with:
install.packages("remotes") # if not already installed
remotes::install_github("matt-dray/snorkel")
Use
To use the Addin:
- Select some text in your function documentation to which you'd like to apply Rd markup (e.g. bold, italics), or place the cursor where you'd like to insert an Rd skeleton (i.e. the functions that insert lists)
- Click the 'RStudio Addins' dropdown at the top of the RStudio IDE
- Scroll/search for 'SNORKEL' and click the function you want
For speed, you can also search for the functions from the RStudio command palette or create custom RStudio keyboard shortcuts.
So, for example, you could highlight the word bold in #' This is bold and select the 'Format Bold' function from the Addin, resulting in #' This is \strong{bold}.
Special cases are ‘Link To Function (Another Package)’ and ‘Link To Function (Another Package, Show Name)’. Both need as input the package name and the function name that you’re linking to, which you should supply in the form 'package::function'.
Help
For help with {snorkel} functions, take a look at the reference page on the package website, or in your R console type ? followed by the function name for its documentation.
Demo
<div class="figure"> <img src="man/figures/snorkel.gif" alt="Gif of RStudio Addin being used to add roxygen2 tags to selected text in the documentation for a function. Addins used are: format as bold, link to function in another package, and make hyperlink." width="75%"/> </div>Code of Conduct
Please note that the {snorkel} project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.
Related Skills
node-connect
342.5kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
85.3kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
342.5kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
342.5kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
