R package development with devtools, usethis, roxygen2. Use for creating and maintaining R packages.
Scanned 6/4/2026
Install via CLI
openskills install LeoLin990405/r-analytics-skill---
name: r-dev-package
description: R package development with devtools, usethis, roxygen2. Use for creating and maintaining R packages.
---
# R Package Development
Creating R packages.
## usethis Setup
```r
library(usethis)
# Create package
create_package("mypackage")
# Add components
use_r("function_name")
use_test("function_name")
use_data(dataset)
use_data_raw("dataset")
# Documentation
use_readme_rmd()
use_vignette("intro")
use_news_md()
use_pkgdown()
# Dependencies
use_package("dplyr")
use_pipe()
use_tibble()
# Git/GitHub
use_git()
use_github()
use_github_action_check_standard()
# License
use_mit_license()
use_gpl3_license()
```
## devtools Workflow
```r
library(devtools)
# Development
load_all() # Load package
document() # Generate docs
test() # Run tests
check() # R CMD check
# Build
build()
install()
# Continuous
dev_mode()
```
## roxygen2 Documentation
```r
#' Title of function
#'
#' Description of what the function does.
#'
#' @param x Description of x
#' @param y Description of y
#' @return Description of return value
#' @export
#' @examples
#' my_function(1, 2)
#'
#' @seealso \code{\link{other_function}}
#' @importFrom dplyr filter select
my_function <- function(x, y) {
# code
}
#' @rdname my_function
#' @export
my_function2 <- function(x) {
# code
}
```
## DESCRIPTION
```
Package: mypackage
Title: What the Package Does
Version: 0.1.0
Authors@R: person("Name", "Last", email = "email@example.com", role = c("aut", "cre"))
Description: Longer description of what the package does.
License: MIT + file LICENSE
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.3
Imports:
dplyr,
ggplot2
Suggests:
testthat (>= 3.0.0)
Config/testthat/edition: 3
```
No comments yet. Be the first to comment!
This skill helps you track, analyze, and report on keyword ranking positions over time. It monitors both traditional SERP rankings and AI/GEO visibility to provide comprehensive search performance insights.
Find and analyze YouTube competitor channels using YouTube Data API v3. Discover competitors through keyword search, category matching, content similarity, and related channel discovery. Compare metrics, content strategies, and market positioning. Use when users want to (1) Find competitors for their YouTube channel, (2) Analyze competitor performance metrics, (3) Compare their channel against competitors, (4) Identify content gaps and opportunities, (5) Benchmark against similar creators, (6...
Get current weather and forecasts (no API key required).
Focused Signals scout for PostHog projects using revenue analytics. Watches the derived revenue product for upstream failures (Stripe sync stalls, capture regressions), config drift (missing subscription property, currency mix surprises, broken Stripe↔person joins, deferred-revenue gaps), and goal-miss escalations. Emits findings only when they clear the confidence bar; otherwise writes durable memory and closes out empty. Self-contained peer in the signals-scout-* fleet — no dependencies on ...
Focused Signals scout for finding observability gaps in PostHog itself — significant event volumes the team isn't tracking, custom events with no insight or dashboard coverage, insights pointing at events that have stopped firing, dashboards missing related context, critical events with no alerts. Watches the event-stream-vs-saved- inventory delta as the team's product evolves and emits findings recommending new insights, dashboard additions, or alerts when gaps clear the confidence bar. Self...