{"id":16274123,"url":"https://github.com/trinker/pax","last_synced_at":"2025-03-20T00:32:11.626Z","repository":{"id":28029224,"uuid":"31524549","full_name":"trinker/pax","owner":"trinker","description":null,"archived":false,"fork":false,"pushed_at":"2018-03-02T13:50:42.000Z","size":2262,"stargazers_count":16,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2023-03-24T05:40:57.273Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/trinker.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-03-02T05:16:15.000Z","updated_at":"2023-03-18T06:11:31.000Z","dependencies_parsed_at":"2022-06-26T07:32:22.640Z","dependency_job_id":null,"html_url":"https://github.com/trinker/pax","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trinker%2Fpax","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trinker%2Fpax/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trinker%2Fpax/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trinker%2Fpax/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trinker","download_url":"https://codeload.github.com/trinker/pax/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219866006,"owners_count":16555916,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-10T18:27:10.195Z","updated_at":"2024-10-10T18:27:10.421Z","avatar_url":"https://github.com/trinker.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\ntitle: \"pax\"\ndate: \"`r format(Sys.time(), '%d %B, %Y')`\"\noutput:\n  md_document:\n    toc: true      \n---\n\n```{r, echo=FALSE}\nlibrary(\"pax\")\ndesc \u003c- suppressWarnings(readLines(\"DESCRIPTION\"))\nregex \u003c- \"(^Version:\\\\s+)(\\\\d+\\\\.\\\\d+\\\\.\\\\d+)\"\nloc \u003c- grep(regex, desc)\nver \u003c- gsub(regex, \"\\\\2\", desc[loc])\nverbad \u003c- sprintf('\u003ca href=\"https://img.shields.io/badge/Version-%s-orange.svg\"\u003e\u003cimg src=\"https://img.shields.io/badge/Version-%s-orange.svg\" alt=\"Version\"/\u003e\u003c/a\u003e\u003c/p\u003e', ver, ver)\n````\n\n```{r, echo=FALSE, message=FALSE, warning=FALSE}\nlibrary(knitr)\nknit_hooks$set(htmlcap = function(before, options, envir) {\n  if(!before) {\n    paste('\u003cp class=\"caption\"\u003e\u003cb\u003e\u003cem\u003e',options$htmlcap,\"\u003c/em\u003e\u003c/b\u003e\u003c/p\u003e\",sep=\"\")\n    }\n    })\nknitr::opts_knit$set(self.contained = TRUE, cache = FALSE)\nknitr::opts_chunk$set(fig.path = \"tools/figure/\")\n```\n\n[![Project Status: Active - The project has reached a stable, usable state and is being actively developed.](http://www.repostatus.org/badges/0.1.0/active.svg)](http://www.repostatus.org/#active)\n[![Build Status](https://travis-ci.org/trinker/pax.svg?branch=master)](https://travis-ci.org/trinker/pax)\n[![Coverage Status](https://coveralls.io/repos/trinker/pax/badge.svg?branch=master)](https://coveralls.io/r/trinker/pax?branch=master)\n[![DOI](https://zenodo.org/badge/5398/trinker/pax.svg)](http://dx.doi.org/10.5281/zenodo.15891)\n`r verbad`\n\nA gold version R package template.\n\n\n\u003cimg src=\"tools/pax_logo/r_pax.png\" width=\"200\" alt=\"pax Logo\"\u003e  \n  \n\n# Description\n\n[**pax**](http://trinker.github.io/pax_dev) is a package template system that is NOT designed to be light weight.  It is the deluxe, gold version of a package template.  **pax** enforces a fairly narrow package management philosophy.  It expects the user will utilize:\n\n1.  [GitHub](https://github.com) for repository sharing\n2.  [RStudio](http://www.rstudio.com/) for GUI \n3.  [**testthat**](http://cran.r-project.org/web/packages/testthat/index.html) for unit testing\n4.  [Coveralls](https://coveralls.io/) + [**covr**](https://github.com/jimhester/covr) for code coverage rating\n5.  [**devtools**](http://cran.r-project.org/web/packages/devtools/index.html)/[**roxygen2**](http://cran.r-project.org/web/packages/roxygen2/index.html) for documentation \n6.  [**knitr**](http://yihui.name/knitr/) for README management\n\n**pax** has one main function that does one job.  `pax` (package and function named **pax**) creates a package template.  It allows the user to specify construction arguments (locally or [via options in *.Rprofile*](http://www.statmethods.net/interface/customizing.html)). Arguments that can be set in the *.Rprofile* include:\n\n\n| Argument         |  Description                                       | Example                                             |\n|------------------|---------------------------------------------|-----------------------------------------------------|\n| `name`  | The user's name (first \u0026 last) |   `options(name = c(first=\"Tyler\",  last=\"Rinker\"))`|                 |\n| `email`  | The user's email address |   `options(email = \"tyler.rinker@gmail.com\")`|  \n| `license` | The package license | `options(license = \"GPL-2\")` |\n| `github.user`  | The user's [GitHub](https://github.com) name |   `options(github.user = \"trinker\")`|    \n| `samples` | Logical; if `TRUE`, sample *.R* \u0026 *test-.R* added | `options(samples = FALSE)` |     \n| `tweak`  | A function or path/[url](http://goo.gl/oL7UXO) to a user specified 'tweaking' function\\* |   `options(tweak = \"http://goo.gl/oL7UXO\")`|     \n\n\\****Note***: *See `?pax` for more information about the `tweak` argument; [CLICK HERE](https://raw.githubusercontent.com/trinker/pax_tweak/master/pax_tweak.R) for an example.*\n\nThese arguments can be quickly added by using the `pax_options` function.  This generates the following blank script that can be added to the user's *.Rprofile*:\n\n```{r, echo=FALSE, comment=NA}\npax_options()\n```\n\n# Template\n\nThe standard **pax** template looks like:\n\n```\n|   .gitignore\n|   .Rbuildignore\n|   DESCRIPTION\n|   foo.rproj\n|   NEWS\n|   README.md\n|   README.Rmd\n|   travis.yml\n|   \n+---inst\n|       maintenance.R\n|       \n+---R\n|       foo-package.R\n|       sample.R\n|       utils.R\n|       \n\\---tests\n    |   testthat.R\n    |   \n    \\---testthat\n            test-sample.R\n```\n\n# Installation\n\nTo download the development version of pax:\n\nDownload the [zip ball](https://github.com/trinker/pax/zipball/master) or [tar ball](https://github.com/trinker/pax/tarball/master), decompress and run `R CMD INSTALL` on it, or use the **pacman** package to install the development version:\n\n```r\nif (!require(\"pacman\")) install.packages(\"pacman\")\npacman::p_load_current_gh(\"trinker/pax\")\n```\n# Additional Features\n\n|  Function      |  Description    |\n|----------------|-----------------|\n| `new_r`        | Makes **roxygen2** style *.R* template file from a `function` or character string |\n| `new_test`     | Makes **testthat** style unit test template file from a `function` or character string |\n| `new_r_test`   | Makes **roxygen2** style *.R* and **testthat** style unit test files from a `function` or character string |\n| `new_data` | Adds data \u0026 appends **roxygen2** style template to package description *.R* file |\n| `new_vignette` | Makes **rmarkdown** style *.Rmd* vignette template file |\n\nIn addition to the `pax` templating function, **pax** also has a few additional tools to generate *.R* and *test-____.R* scripts that add a **roxygen2** style *.R* file to the *R* directory as well as adding a **testthat** style unit test file to *tests/testthat* directory.  These actions can be done separately but it is recommended that they be combined into one function call: `new_r_test`.  This sets a [test-driven development](http://en.wikipedia.org/wiki/Test-driven_development) expectation that as a function is created a unit test is used in the development process.\n\nThe `new_data` enables the user to add a data set to the *data* directory and append the **roxygen2** style *.R* markup template to the package's description file (*R/____-package.R*).  The `new_vignette` function provides a means of quickly adding an [**rmarkdown**](http://rmarkdown.rstudio.com/package_vignette_format.html) with the appropriate `title` field and  `\\VignetteIndexEntry` set.\n\n# Help\n\n- [HTML Vignette: Introduction to pax](http://trinker.github.io/pax/vignettes/introduction.html)       \n\n# Additional Package Development Resources\n\n- [Writing R Extensions](http://cran.r-project.org/doc/manuals/r-release/R-exts.html)\n- [RStudio Package Development Cheat Sheet](http://www.rstudio.com/wp-content/uploads/2015/03/devtools-cheatsheet.pdf)       \n- [R packages by Hadley Wickham](http://r-pkgs.had.co.nz/)        \n\n# Contact\n\nYou are welcome to:\n* submit suggestions and bug-reports at: \u003chttps://github.com/trinker/pax/issues\u003e\n* send a pull request on: \u003chttps://github.com/trinker/pax/\u003e\n* compose a friendly e-mail to: \u003ctyler.rinker@gmail.com\u003e\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrinker%2Fpax","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrinker%2Fpax","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrinker%2Fpax/lists"}