@@ -11,17 +11,22 @@ myrpackage/
1111├── DESCRIPTION # Package metadata
1212├── NAMESPACE # Generated from roxygen2 docs
1313├── R/
14- │ └── hello.R # Example R function with documentation
14+ │ ├── hello.R # Example R function with documentation
15+ │ └── goodbye.R # Another example function
1516├── man/
16- │ └── hello.Rd # Generated manual file
17+ │ ├── hello.Rd # Generated manual file
18+ │ └── goodbye.Rd # Manual for goodbye
1719├── tests/
1820│ └── testthat/
19- │ └── test-hello.R # Unit test
21+ │ ├── test-hello.R # Unit test
22+ │ └── test-goodbye.R # Unit test
2023│ └── testthat.R # Testthat runner setup
2124├── vignettes/
2225│ └── intro.Rmd # Long-form documentation (optional)
2326├── .Rbuildignore # Files ignored during build
2427├── .gitignore # Git ignore rules
28+ ├── inst/
29+ │ └── CITATION # Citation information
2530├── LICENSE # Open-source license (MIT recommended)
2631└── README.md # Project overview and usage
2732```
@@ -59,9 +64,22 @@ hello <- function() {
5964 print(" Hello, world!" )
6065}
6166```
62-
6367---
6468
69+ ## 📄 R/goodbye.R
70+
71+ ``` r
72+ # ' Say Goodbye
73+ # '
74+ # ' This function prints a friendly farewell.
75+ # '
76+ # ' @return No return value, called for side effects.
77+ # ' @export
78+ goodbye <- function () {
79+ print(" Goodbye, world!" )
80+ }
81+ ```
82+ ---
6583## 🧪 tests/testthat/test-hello.R
6684
6785``` r
@@ -102,67 +120,22 @@ test_check("myrpackage")
102120```
103121MIT License
104122
105- Copyright (c) 2025 Your Name
123+ Copyright (c) 2025 Diogo Ribeiro
106124
107125Permission is hereby granted, free of charge, to any person obtaining a copy...
108126```
109-
110127---
111128
112- ## 📄 vignettes/intro.Rmd (Optional)
129+ ## 📑 Citation
113130
114- ```` rmd
115- ---
116- title: "Getting Started with myrpackage"
117- output: rmarkdown::html_vignette
118- vignette: >
119- %\VignetteIndexEntry{Getting Started}
120- %\VignetteEngine{knitr::rmarkdown}
121- %\VignetteEncoding{UTF-8}
122- ---
131+ To cite this package, run ` citation("myrpackage") ` in R. This will display the bibliographic information from ` inst/CITATION ` .
123132
124- ```{r setup, include = FALSE}
125- library(myrpackage)
126- ````
127-
128- This is an introduction to using the package.
129-
130- ````
131133
132134---
133135
134- ## 🚀 Development Workflow
135-
136- 1. **Set up the package in RStudio or manually**:
137- ```r
138- usethis::create_package("myrpackage")
139- usethis::use_git()
140- usethis::use_mit_license()
141- usethis::use_roxygen_md()
142- usethis::use_testthat()
143- devtools::document()
144- ````
145-
146- 2 . ** Check your package** :
147-
148- ``` r
149- devtools :: check()
150- ```
151-
152- 3 . ** Install locally** :
153-
154- ``` r
155- devtools :: install()
156- ```
157-
158- 4 . ** Submit to CRAN** :
159-
160- ``` r
161- devtools :: release()
162- ```
136+ ## 📄 vignettes/intro.Rmd (Optional)
163137
138+ ```` rmd
164139---
165-
166- ## ✅ Summary
167-
168- This scaffold provides everything needed to start building an R package with good development hygiene, testing, documentation, and CRAN readiness.
140+ title: "Getting Started with myrpackage"
141+ output: rmarkdown::html_vignette
0 commit comments