{"id":14068283,"url":"https://github.com/waldronlab/ProjectAsPackage","last_synced_at":"2025-07-30T03:32:43.108Z","repository":{"id":71019933,"uuid":"146376538","full_name":"waldronlab/ProjectAsPackage","owner":"waldronlab","description":"Demonstration of the use of an R package to organize a data analysis project","archived":false,"fork":false,"pushed_at":"2020-03-30T18:30:47.000Z","size":206,"stargazers_count":21,"open_issues_count":0,"forks_count":4,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-12-04T09:39:09.946Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://waldronlab.io/ProjectAsPackage/","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/waldronlab.png","metadata":{"files":{"readme":"README.md","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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-08-28T01:47:32.000Z","updated_at":"2024-06-25T22:36:20.000Z","dependencies_parsed_at":"2023-04-26T21:01:33.474Z","dependency_job_id":null,"html_url":"https://github.com/waldronlab/ProjectAsPackage","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/waldronlab/ProjectAsPackage","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waldronlab%2FProjectAsPackage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waldronlab%2FProjectAsPackage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waldronlab%2FProjectAsPackage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waldronlab%2FProjectAsPackage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/waldronlab","download_url":"https://codeload.github.com/waldronlab/ProjectAsPackage/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waldronlab%2FProjectAsPackage/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267803984,"owners_count":24146527,"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","status":"online","status_checked_at":"2025-07-30T02:00:09.044Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-08-13T07:06:04.357Z","updated_at":"2025-07-30T03:32:42.833Z","avatar_url":"https://github.com/waldronlab.png","language":"R","funding_links":[],"categories":["R"],"sub_categories":[],"readme":"[![Travis-CI Build Status](https://travis-ci.org/waldronlab/ProjectAsPackage.svg?branch=master)](https://travis-ci.org/waldronlab/ProjectAsPackage)\n[![Coverage Status](https://codecov.io/github/waldronlab/ProjectAsPackage/coverage.svg?branch=master)](https://codecov.io/github/waldronlab/ProjectAsPackage?branch=master)\n\n\n# Project-as-a-package\n\n\n## Summary\n\n[ProjectAsPackage](https://www.github.com/waldronlab/ProjectAsPackage) provides a template for generating reproducible analyses as an R package. Why? Using an R package has some advantages:\n\n* You can separate re-usable functions from your analysis, and have help pages for these functions. You can also use help pages as \"codebooks\" for the datasets.\n* You can include data and code in the same package. If the data are somewhat big, you can use [Git Large File Storage](https://git-lfs.github.com/). \n* You can automatically install all needed packages when installing this package, just by adding these packages to the \"Depends\" section or \"Imports\" section of the DESCRIPTION file.\n* You can have one or more `.Rmd` files in the \"vignettes\" directory that reproduce your analysis, and take advantage of rmarkdown caching to speed up running them.\n* You can use a local package or GitHub private repo before you are ready to make your code/data public. Then once you publish on GitHub, your analysis will be both easily reproducible and professional-looking.\n\n## The data\n\n[ProjectAsPackage](https://www.github.com/waldronlab/ProjectAsPackage) demonstrates setup for analyzing published data from:\n\n\u003e Chou B, Krill LS, Horton BB, Barat CE, Trimble CL:\n\u003e Disparities in human papillomavirus vaccine completion among\n\u003e vaccine initiators. Obstet. Gynecol. 2011, 118:14–20.\n\n## How to make your own copy of ProjectAsPackage on GitHub\n\n[ProjectAsPackage](https://www.github.com/waldronlab/ProjectAsPackage) is set up as a GitHub \"template\" allowing you to initiate a new repository with it as the starting point for a new analysis. Click on \"[Use this template](https://github.com/waldronlab/ProjectAsPackage/generate)\" to create a new GitHub repo starting with this code. \n\n## Building\n\nBuilding is most easily done using the \"Build\" menu in [RStudio](https://rstudio.com/). Building roxygen documentation requires the [roxygen2](https://cran.r-project.org/web/packages/roxygen2/vignettes/roxygen2.html) package.\n\n## pkgdown to make a web page\n\nTo easily publish your package and analysis as a web site using [pkgdown](https://pkgdown.r-lib.org/articles/pkgdown.html) (publicly on GitHub-pages or locally), you can use commands in the script [update.sh](https://github.com/waldronlab/ProjectAsPackage/blob/master/update.sh). This very short script runs the command `pkgdown::build_site(lazy=TRUE)`. \n\nYou can customize the website with the [_pkgdown.yml](https://github.com/waldronlab/ProjectAsPackage/blob/master/_pkgdown.yml) file using instructions from [pkgdown](https://pkgdown.r-lib.org/articles/pkgdown.html). \n\n### Automatic hyperlinking to help pages\n\nNote that the line in this [_pkgdown.yml](https://github.com/waldronlab/ProjectAsPackage/blob/master/_pkgdown.yml) providing the site URL is only there to provide correct hyperlinking to help pages, such as `?gardasil`. For correct hyperlinking to help pages, the URL needs to be provided here and in the [DESCRIPTION](https://github.com/waldronlab/ProjectAsPackage/blob/master/DESCRIPTION) `URL:` line.\n\n**To activate GitHub pages**, from your GitHub repo you need to click on \"Settings\" on the top toolbar, scroll down to \"GitHub Pages\", then change \"None - Disable GitHub Pages\" to \"master branch /docs folder\". You should now see the URL for your new web page here.  If you can't select this option, it's because you haven't yet pushed a master branch docs folder created by pkgdown to GitHub. \n\nSee the result [here](http://waldronlab.io/ProjectAsPackage/).\n\n## travis-CI for continuous integration\n\nThis GitHub site is set up to automatically build, check, and deploy\nthe pkgdown site to GitHub Pages with every commit. See the file\n[.travis.yml] for a template and setup instructions. You will have to:\n\n1. edit the [.travis.yml] file\n2. edit the README.md file if you want to show a Travis badge on your GitHub site,\n3. link your GitHub account to Travis-ci.org,\n4. activate your GitHub repo on Travis: https://docs.travis-ci.com/user/deployment/pages/. The Travis site for this repo then appeared at https://docs.travis-ci.com/user/deployment/pages/\n4. create a GitHub token at https://github.com/settings/tokens (for \"scopes\" choose \"repo\" and \"admin:repo_hook\")\n5. enter this token as an environment value with name \"GITHUB_TOKEN\", \"available to all branches\", on travis-ci.org at https://travis-ci.org/github/waldronlab/ProjectAsPackage/settings\n6. Create an initially empty gh-pages branch, where GitHub Pages will be deployed:\n```git checkout --orphan gh-pages\ngit rm -rf .\ngit commit --allow-empty -m 'Initial gh-pages commit'\ngit push origin gh-pages\ngit checkout master\n```\n\n\n## Licensing\n\n\u003cp xmlns:dct=\"http://purl.org/dc/terms/\" xmlns:vcard=\"http://www.w3.org/2001/vcard-rdf/3.0#\"\u003e\n  \u003ca rel=\"license\"\n     href=\"http://creativecommons.org/publicdomain/zero/1.0/\"\u003e\n    \u003cimg src=\"https://licensebuttons.net/p/zero/1.0/88x31.png\" style=\"border-style: none;\" alt=\"CC0\" /\u003e\n  \u003c/a\u003e\n  \u003cbr /\u003e\n  To the extent possible under law,\n  \u003ca rel=\"dct:publisher\"\n     href=\"https://waldronlab.io\"\u003e\n    \u003cspan property=\"dct:title\"\u003eLevi Waldron\u003c/span\u003e\u003c/a\u003e\n  has waived all copyright and related or neighboring rights to\n  \u003cspan property=\"dct:title\"\u003eProjectAsPackage\u003c/span\u003e.\nThis work is published from:\n\u003cspan property=\"vcard:Country\" datatype=\"dct:ISO3166\"\n      content=\"US\" about=\"www.waldronlab.io\"\u003e\n  United States\u003c/span\u003e.\n\u003c/p\u003e\n\n## Authors\n\nChloe Mirzayi, Audrey Renson, Levi Waldron\n\nCUNY Graduate School of Public Health and Health Policy\u003cbr/\u003e\nInstitute for Implementation Science in Public Health\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaldronlab%2FProjectAsPackage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwaldronlab%2FProjectAsPackage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaldronlab%2FProjectAsPackage/lists"}