https://github.com/bearloga/compostable
R Markdown document for making a compostable vs not compostable table dynamically from files in directories
https://github.com/bearloga/compostable
Last synced: 8 months ago
JSON representation
R Markdown document for making a compostable vs not compostable table dynamically from files in directories
- Host: GitHub
- URL: https://github.com/bearloga/compostable
- Owner: bearloga
- Created: 2020-04-19T17:51:49.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-04-19T17:51:54.000Z (about 6 years ago)
- Last Synced: 2025-05-15T13:09:47.013Z (about 1 year ago)
- Language: CSS
- Size: 589 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
Awesome Lists containing this project
README
---
title: "Compostables"
output: github_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE, message = FALSE)
```
The [R Markdown](https://rmarkdown.rstudio.com/) document [compost.Rmd](compost.Rmd) together with [styles.css](styles.css) produces an HTML page like:

...which can be saved to a PDF, printed, and laminated:

## Images
The document generated by a page based on files in the `images/compostable` and `images/not compostable` directories which looked like:
```{r directory}
directory <- data.frame(
pathString = fs::dir_ls("images", recurse = TRUE),
stringsAsFactors = FALSE
)
```
```{r tree}
library(data.tree) # install.packages("data.tree")
library(magrittr)
tree <- as.Node(directory)
ToDataFrameTree(tree)$levelName %>%
paste0(collapse = "\n") %>%
cat
```