{"id":14062733,"url":"https://github.com/jacobbien/litr-project","last_synced_at":"2025-11-05T18:06:21.857Z","repository":{"id":46872404,"uuid":"483514829","full_name":"jacobbien/litr-project","owner":"jacobbien","description":"Writing R Packages with Literate Programming","archived":false,"fork":false,"pushed_at":"2024-07-05T23:31:50.000Z","size":14903,"stargazers_count":37,"open_issues_count":8,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-10-31T08:39:06.679Z","etag":null,"topics":["knitr","literate-programming","r","r-package","rmarkdown"],"latest_commit_sha":null,"homepage":"https://jacobbien.github.io/litr-project/","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jacobbien.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":"CONTRIBUTING.md","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":"2022-04-20T05:08:03.000Z","updated_at":"2024-08-07T14:25:20.000Z","dependencies_parsed_at":"2023-02-18T20:15:24.593Z","dependency_job_id":"e083cb3c-73c9-4f73-bbc0-6380a4714eb2","html_url":"https://github.com/jacobbien/litr-project","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacobbien%2Flitr-project","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacobbien%2Flitr-project/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacobbien%2Flitr-project/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacobbien%2Flitr-project/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jacobbien","download_url":"https://codeload.github.com/jacobbien/litr-project/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228022742,"owners_count":17857593,"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":["knitr","literate-programming","r","r-package","rmarkdown"],"created_at":"2024-08-13T07:02:11.734Z","updated_at":"2025-11-05T18:06:21.776Z","avatar_url":"https://github.com/jacobbien.png","language":"HTML","funding_links":[],"categories":["HTML"],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  eval = FALSE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\n```\n\n# Creating `litr`\n\n\u003c!-- badges: start --\u003e\n\u003c!-- badges: end --\u003e\n\n**Note:** If you are looking to use the `litr` package, please visit the `litr` website [here](https://jacobbien.github.io/litr-project/), where you'll be able to learn about the package. If you are interested in how `litr` is made, you are in the right place.\n\n## Background\n\nThe `litr` R package allows one to write R packages using literate programming.  The developers of `litr` are believers in literate programming and so, quite naturally, want to use literate programming to develop `litr`.  For obvious reasons, we couldn't use `litr` before it existed.  So we wrote the initial viable version in a standard, non-literate way and released this as [v0.0.1](https://github.com/jacobbien/litr-project/releases/tag/v0.0.1).  We can think of this as the \"base case.\"  This is the last version that is written in the traditional way.  Every subsequent version of `litr` will be generated using the previous version of `litr`.  In particular, v0.0.2 of `litr` is functionally equivalent to v0.0.1, but the package is defined in a generating .Rmd file; a call to v0.0.1's `litr::render()` outputs the `litr` package v0.0.2.  This all might sound complicated, but one can think of this as how developers of an operating system probably write their code on a computer that is running the previous stable version of the operating system.\n\n## How to generate a new version of `litr` using the previous release\n\nTo create a new version of `litr`, we first install the latest release, then make any desired changes to `create-litr.Rmd` and then use the installed version's `litr::render()` to create the new version:\n\n```{r}\nremotes::install_github(\"jacobbien/litr-project@*release\", subdir = \"litr\")\nlitr::render(\"create-litr/index.Rmd\")\nfs::dir_copy(\"create-litr/_book\", \"docs/create\", overwrite = TRUE)\nfs::dir_delete(\"create-litr/_book\")\n```\n\nIn the above code, `@*release` stands for the latest release.  For example, at the time of creating version `0.0.2`, this would be `v0.0.1`.\n\nThis will generate the new version of `litr` along with [this bookdown](https://jacobbien.github.io/litr-project/create/).  From there, you can build/install as you would for any other package.  For checking the package, use \n\n```{r}\ndevtools::check(\"litr\", document = FALSE)\n```\n\nThe `document = FALSE` prevents `devtools` from running its version of `document()` internally, which would overwrite the modifications that `litr::document()` has made.\n\nFor more notes on contributing to `litr`, please see [CONTRIBUTING.md](CONTRIBUTING.md).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacobbien%2Flitr-project","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjacobbien%2Flitr-project","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacobbien%2Flitr-project/lists"}