This is a work-in-progress website that provides an example for building a package in R. devtools, usethis, and pkgdown are used.
The package includes these functions:
- ff_rtest_add_basic: An addition tester, with a fuller set of Roxygen2 markups/tags.
- ff_rtest_mul_basic: A multiplication tester.
The package includes these datasets:
- simu_income_v5n9: A simulated unbalanced panel of normally drawn income values.
This package includes these vignettes:
- Using devtools to Create a R Package
- Generate Package Website with pkgdown and Github Pages
- Data script, rda file, and documentation
This website is built automatically with Github Actions, the instructions are contained here:
- pkgdown.yaml, which is from r-lib actions
The purpose of this website is to provide examples for how to document functions, how to write vignettes, how to test/build/deploy a package, and how to deploy to Github pages. Similar structures are used for Fan’s other research and teaching repositories.
From Fan’s other repositories: For research project repositories, see MEconTools, REconTools, and Dynamic Asset Repository; For code examples, see also Python Example Code (bookdown site), R Example Code (bookdown site), Matlab Example Code and Stata Example Code; For intro econ with Matlab, see Intro Mathematics for Economists, and for intro stat with R, see Intro Statistics for Undergraduates (bookdown site). See here for all of Fan’s public repositories.