Skip to content

Commit

Permalink
added call to dplyr library
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanThoma committed May 3, 2024
1 parent e7ba91c commit aac762e
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 15 deletions.
25 changes: 10 additions & 15 deletions R/appendix.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
library(dplyr)
# markdown helpers --------------------------------------------------------

markdown_appendix <- function(name, content) {
Expand All @@ -15,15 +16,16 @@ insert_source <- function(repo_spec, name,
collection = "posts",
branch = "main",
host = "https://github.com",
text = "source code") {
text = "Source",
file_name) {
path <- paste(
host,
repo_spec,
"tree",
branch,
collection,
name,
"index.qmd",
file_name,
sep = "/"
)
return(markdown_link(text, path))
Expand All @@ -39,25 +41,17 @@ insert_lockfile <- function(repo_spec, name,
collection = "posts",
branch = "main",
host = "https://github.com",
text = "R environment") {
path <- paste(
host,
repo_spec,
"tree",
branch,
collection,
name,
"renv.lock",
sep = "/"
)
text = "Session info") {
path <- path <- "https://pharmaverse.github.io/blog/session_info.html"

return(markdown_link(text, path))
}



# top level function ------------------------------------------------------

insert_appendix <- function(repo_spec, name, collection = "posts") {
insert_appendix <- function(repo_spec, name, collection = "posts", file_name) {
appendices <- paste(
markdown_appendix(
name = "Last updated",
Expand All @@ -67,7 +61,8 @@ insert_appendix <- function(repo_spec, name, collection = "posts") {
markdown_appendix(
name = "Details",
content = paste(
insert_source(repo_spec, name, collection),
insert_source(repo_spec, name, collection, file_name = file_name),
# get renv information,
insert_lockfile(repo_spec, name, collection),
sep = ", "
)
Expand Down
1 change: 1 addition & 0 deletions posts/2024-02-13_teal_on_cran/appendix.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
library(dplyr)
# markdown helpers --------------------------------------------------------

markdown_appendix <- function(name, content) {
Expand Down
1 change: 1 addition & 0 deletions posts/2024-02-14_iscr_conference/appendix.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
library(dplyr)
# markdown helpers --------------------------------------------------------

markdown_appendix <- function(name, content) {
Expand Down
1 change: 1 addition & 0 deletions posts/2024-03-04_inside_the__phar.../appendix.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
library(dplyr)
# markdown helpers --------------------------------------------------------

markdown_appendix <- function(name, content) {
Expand Down
1 change: 1 addition & 0 deletions posts/2024-03-11_tips_for__first_.../appendix.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
library(dplyr)
# markdown helpers --------------------------------------------------------

markdown_appendix <- function(name, content) {
Expand Down
1 change: 1 addition & 0 deletions posts/2024-04-15_de-_mystifying__.../appendix.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
library(dplyr)
# markdown helpers --------------------------------------------------------

markdown_appendix <- function(name, content) {
Expand Down
1 change: 1 addition & 0 deletions posts/2024-04-29_appsilon_and__sa.../appendix.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
library(dplyr)
# markdown helpers --------------------------------------------------------

markdown_appendix <- function(name, content) {
Expand Down

0 comments on commit aac762e

Please sign in to comment.