Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/muschellij2/hopstat
A repository of all my posts on HopStat
https://github.com/muschellij2/hopstat
Last synced: 19 days ago
JSON representation
A repository of all my posts on HopStat
- Host: GitHub
- URL: https://github.com/muschellij2/hopstat
- Owner: muschellij2
- Created: 2014-01-11T17:57:13.000Z (almost 11 years ago)
- Default Branch: gh-pages
- Last Pushed: 2020-10-01T14:32:04.000Z (about 4 years ago)
- Last Synced: 2024-10-16T08:22:24.563Z (2 months ago)
- Language: HTML
- Size: 753 MB
- Stars: 2
- Watchers: 6
- Forks: 10
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
Awesome Lists containing this project
README
---
output: github_document
---```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```# Hopstat Blog
Here are the posts of the RMD files from my website. Hopefully it's a good idea. So if you wnat to run anything, just tangle out the code using `knitr`.```{r, echo = FALSE, message = FALSE}
library(tibble)
library(dplyr)
library(yaml)
x = list.files(pattern = "index.html", recursive = TRUE)
df = tibble::tibble(
link = x,
dn = dirname(x),
rmd = file.path(dn, paste0(dn, ".Rmd"))
)
titles = sapply(df$rmd, function(x) {
if (file.exists(x)) {
input_lines = readLines(x, warn = FALSE)
title = rmarkdown:::parse_yaml_front_matter(input_lines)
title = title$title
if (!is.null(title)) {
x = title
} else {
x = gsub("_", " ", dirname(x))
}
} else {
x = gsub("_", " ", dirname(x))
}
x
})
df$title = titles
df = df %>%
mutate(link = paste0("[", title, "](", link, ")"),
rmd = paste0("[Rmd](", rmd, ")")) %>%
select(-title, -dn)
df %>%
knitr::kable(escape = FALSE)
```