{"id":14067725,"url":"https://github.com/coatless-rpkg/assignr","last_synced_at":"2025-08-22T20:17:33.291Z","repository":{"id":45339615,"uuid":"61743294","full_name":"coatless-rpkg/assignr","owner":"coatless-rpkg","description":"Tools for Educators Writing Assignments in RMarkdown","archived":false,"fork":false,"pushed_at":"2023-11-14T08:35:42.000Z","size":749,"stargazers_count":42,"open_issues_count":9,"forks_count":7,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-11-24T19:48:29.731Z","etag":null,"topics":["homework","r","r-package","rmarkdown","rstats","teaching","teaching-tool"],"latest_commit_sha":null,"homepage":"https://r-pkg.thecoatlessprofessor.com/assignr/","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/coatless-rpkg.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}},"created_at":"2016-06-22T18:45:35.000Z","updated_at":"2024-02-12T15:44:17.000Z","dependencies_parsed_at":"2024-02-19T19:16:07.499Z","dependency_job_id":"0859c26b-9569-4e2d-90d8-b53b0afefb77","html_url":"https://github.com/coatless-rpkg/assignr","commit_stats":null,"previous_names":["coatless-rpkg/assignr"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coatless-rpkg%2Fassignr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coatless-rpkg%2Fassignr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coatless-rpkg%2Fassignr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coatless-rpkg%2Fassignr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coatless-rpkg","download_url":"https://codeload.github.com/coatless-rpkg/assignr/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227470127,"owners_count":17778930,"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":["homework","r","r-package","rmarkdown","rstats","teaching","teaching-tool"],"created_at":"2024-08-13T07:05:44.851Z","updated_at":"2024-12-01T02:07:21.333Z","avatar_url":"https://github.com/coatless-rpkg.png","language":"R","funding_links":[],"categories":["R"],"sub_categories":[],"readme":"# assignr \n\n\u003c!-- badges: start --\u003e\n[![R build status](https://github.com/coatless-rpkg/assignr/workflows/R-CMD-check/badge.svg)](https://github.com/coatless-rpkg/assignr/actions)\n[![Package-License](http://img.shields.io/badge/license-GPL%20(%3E=2)-brightgreen.svg?style=flat)](http://www.gnu.org/licenses/gpl-2.0.html)\n\u003c!-- badges: end --\u003e\n\nTools for creating homework assignments and solutions using [_RMarkdown_](http://rmarkdown.rstudio.com/).\n\n## Motivation\n\nWriting homework assignments for students in the age of [_RMarkdown_](http://rmarkdown.rstudio.com/) necessitates the creation\nof _two_ separate documents -- `assign.Rmd` and `soln.Rmd`.\nThe goal of `assignr` is to create one document `main.Rmd` that can be broken\napart into the above two documents. Thus, there is no longer a need to \n_copy and paste_ between the `assign` and the `soln` documents as all of the\ncontents are together in one file.\n\n![Example workflow with `assignr`](https://media.giphy.com/media/l2QEaOm8vqHYG2aNG/giphy.gif)\n\n## Installation\n\n`assignr` is only available via GitHub.\n\nTo install the package from GitHub, you can type:\n\n```r\ninstall.packages(\"devtools\")\n\ndevtools::install_github(\"coatless-rpkg/assignr\")\n```\n\n## Usage\n\nTo use `assignr`, create an Rmd file named `WXYZ-main.Rmd`, where `WXYZ` \ncould be `hw00`. Within the file, add to your code chunks one of the following\nchunk options:\n\n1. `solution = TRUE`\n    - to mark a solution\n2. `directions = TRUE` \n    - to indicate directions\n\nWhen specifying text directions that should not appear in the solution file, use\nthe latter chunk option, and set the code chunk engine to `asis`, e.g.\n\n````\n```{asis name, directions = TRUE}\nThe goal of the following exercise is... \n```\n````\n\nThen, in _R_, run: \n\n```r\n# Render output\nassignr(\"hw00-main.Rmd\")\n```\n\nExample Output:\n\n```\nhw00\n├── hw00-assign\n│   ├── hw00-assign.Rmd\n│   ├── hw00-assign.html\n│   ├── hw00-assign.pdf\n│   └── hw00-assign.zip\n└── hw00-soln\n    ├── hw00-soln.Rmd\n    ├── hw00-soln.html\n    ├── hw00-soln.pdf\n    └── hw00-soln.zip\n```\n\nPreviews of what is contained in each file are shown next.\n\n### Instructor Main\n\nIn the main file, denoted as `*-main.Rmd`, all content -- including solutions --\nshould be placed. As an example of contents, please see the `hw00-main.Rmd`\ndocument that ships with the package.\n\n```r\nlibrary(\"assignr\")\n\nfile.show(get_example_filepath(\"hw00-main.Rmd\"))\n```\n\n````\n---\ntitle: 'Homework X'\nauthor: \"Prof. Name\"\ndate: 'Due: Friday, Month Day by 1:59 PM CDT'\noutput:\n  html_document:\n    theme: readable\n    toc: yes\n---\n\n# Exercise 1 (Introductory `R`)\n\n```{asis, directions = TRUE}\nFor this exercise, we will create a couple different vectors.\n```\n\n**(a)** Create two vectors `x0` and `x1`. Each should have a\nlength of 25 and store the following:\n\n- `x0`: Each element should be the value `10`.\n- `x1`: The first 25 cubed numbers, starting from `1.` (e.g. `1`, `8`, `27`, et cetera)\n\n```{asis, solution = TRUE}\n**Solution:**\n```\n\n```{r, solution = TRUE}\nx0 = rep(10, 25)\nx1 = (1:25) ^ 3\n```\n````\n\n### Student Assignment\n\nWithin this section, the assignment rmarkdown file given to students is displayed.\n\n````\n---\ntitle: 'Homework X'\nauthor: \"Prof. Name\"\ndate: 'Due: Friday, Month Day by 1:59 PM CDT'\noutput:\n  html_document:\n    theme: readable\n    toc: yes\n---\n\n# Exercise 1 (Introductory `R`)\n\nFor this exercise, we will create a couple different vectors.\n\n**(a)** Create two vectors `x0` and `x1`. Each should have a\nlength of 25 and store the following:\n\n- `x0`: Each element should be the value `10`.\n- `x1`: The first 25 cubed numbers, starting from `1.` (e.g. `1`, `8`, `27`, et cetera)\n````\n\n![PDF Rendering of `hw00-assign.Rmd`](tools/readme/assignr-assign-pdf.png)\n\n### Solutions \n\nLastly, we have the assignment rmarkdown file that contains the solutions\nand their respective output.\n\n````\n---\ntitle: 'Homework X'\nauthor: \"Prof. Name\"\ndate: 'Due: Friday, Month Day by 1:59 PM CDT'\noutput:\n  html_document:\n    theme: readable\n    toc: yes\n---\n\n# Exercise 1 (Introductory `R`)\n\n\n**(a)** Create two vectors `x0` and `x1`. Each should have a\nlength of 25 and store the following:\n\n- `x0`: Each element should be the value `10`.\n- `x1`: The first 25 cubed numbers, starting from `1.` (e.g. `1`, `8`, `27`, et cetera)\n\n**Solution:**\n\n```{r, solution = TRUE}\nx0 = rep(10, 25)\nx1 = (1:25) ^ 3\n```\n````\n\n![PDF Rendering of `hw00-soln.Rmd`](tools/readme/assignr-soln-pdf.png)\n\n## Authors\n\nJames Joseph Balamuta and David Dalpiaz\n\n## License\n\nGPL (\u003e= 2)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoatless-rpkg%2Fassignr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoatless-rpkg%2Fassignr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoatless-rpkg%2Fassignr/lists"}