Repository navigation
Expand file tree
/
Copy pathREADME.Rmd
More file actions
114 lines (88 loc) · 5.08 KB
/
Copy pathREADME.Rmd
File metadata and controls
114 lines (88 loc) · 5.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
---
title: "rpkgkit: Create and Maintain R Packages"
author: "Yuxi Yang"
date: "`r Sys.Date()`"
lang: en-US
output:
md_document:
variant: gfm
editor_options:
markdown:
wrap: sentence
chunk_output_type: console
always_allow_html: true
---
<!-- README.md is generated from README.Rmd. Please edit that file. -->
```{r}
#| include = FALSE
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# rpkgkit <a href="https://wanglabcsu.github.io/rpkgkit/"><img src="man/figures/logo.png" align="right" height="139" alt="rpkgkit website" /></a>
<!-- badges: start -->
[](https://CRAN.R-project.org/package=rpkgkit)
[](https://wanglabcsu.r-universe.dev/rpkgkit)
[](https://github.com/WangLabCSU/rpkgkit/actions/workflows/R-CMD-check.yaml)
[](https://github.com/WangLabCSU/rpkgkit)
[](https://app.codecov.io/gh/WangLabCSU/rpkgkit)
[](https://deepwiki.com/WangLabCSU/rpkgkit)
[](https://cran.r-project.org/package=rpkgkit)
[](inst/translations/README.zh-cn.md)
[](inst/translations/README.es.md)
<!-- badges: end -->
## Overview
`rpkgkit` provides utilities for creating and maintaining R packages. The
functions support common development tasks such as managing standalone scripts,
maintaining `NEWS.md`, modernizing R source, configuring package infrastructure,
and maintaining README files.
Most functions detect the active file context in RStudio and Positron (2026.10.1 or later), so a file path can often be omitted.
## Installation
Install the released version from CRAN:
```r
install.packages("rpkgkit")
```
Install the development version from r-universe:
```r
install.packages(
"rpkgkit",
repos = c("https://wanglabcsu.r-universe.dev", "https://cloud.r-project.org")
)
```
Or install from GitHub (recommended):
```r
pak::pak("WangLabCSU/rpkgkit")
```
## Guides
Detailed, copy-ready examples are organized by task in the package website:
- [rpkgkit standalone scripts](https://wanglabcsu.github.io/rpkgkit/articles/standalone_tools.html): import standalone helpers, manage their metadata, and discover or create standalone files.
- [Code Convertion](https://wanglabcsu.github.io/rpkgkit/articles/code_convertion.html): qualify package calls, check source code, modernize syntax, and convert integer or non-ASCII literals.
- [Edit NEWS](https://wanglabcsu.github.io/rpkgkit/articles/news.html): create, update, display, and validate `NEWS.md` entries.
- [Package Setup & Maintenace](https://wanglabcsu.github.io/rpkgkit/articles/pkg_maintain.html): configure package infrastructure, vendor permissively licensed code, and manage ignore files.
- [Tools for README & Documentation](https://wanglabcsu.github.io/rpkgkit/articles/readme_and_doc.html): create README translations and insert or generate badges.
It's recommended to use following packages together with `rpkgkit`:
- [`pkgdown`](https://pkgdown.r-lib.org/) / [`pkgdown.offline`](https://nanx.me/pkgdown.offline/): generate package website.
- [`pkgload`](https://pkgload.r-lib.org/): load package source code.
- [`flir`](https://flir.etiennebacher.com/) / [`jarl`](https://jarl.etiennebacher.com/) / [`lintr`](https://lintr.r-lib.org/): lint and fix source code.
- [`air`](https://posit-dev.github.io/air/): format source code.
- [`usethis`](https://usethis.r-lib.org/): manage package metadata.
- [`devtools`](https://devtools.r-lib.org/): build and check package.
## AI skills
`rpkgkit` ships an agent skill that tells coding agents when to reach for
`rpkgkit` and how to call it. It follows the
[Agent Skills](https://skills.sh) layout, so it works with Claude Code, Codex,
Cursor, Positron, and other compatible agents:
```bash
npx skills add WangLabCSU/rpkgkit --skill rpkgkit
```
Add `-g` to install it for every project, and `-a <agent>` to skip the agent
prompt. The skill source lives in
[`skills/rpkgkit/`](https://github.com/WangLabCSU/rpkgkit/tree/main/skills/rpkgkit).
## Acknowledgements
We would like to thank the following people and projects:
- The authors of the [pedant](https://github.com/wurli/pedant) package — **Jacob Scott**, **Christopher T. Kenny**, and **Sebastian Lammers** — whose code is included (under MIT license) in `R/vendor-pedant.R`.
- The authors of the [pkgdev](https://github.com/dieghernan/pkgdev) package — **Diego Hernangómez** — whose code is included (under MIT license) in `R/vendor-pkgdev.R`.
- All contributors and users who have reported issues, suggested features, or helped improve the package.