From aac762e37a6c57d72f0290e6d86ad4522572f980 Mon Sep 17 00:00:00 2001 From: Stefan Pascal Thoma Date: Fri, 3 May 2024 07:12:18 +0000 Subject: [PATCH] added call to dplyr library --- R/appendix.R | 25 ++++++++----------- posts/2024-02-13_teal_on_cran/appendix.R | 1 + posts/2024-02-14_iscr_conference/appendix.R | 1 + .../2024-03-04_inside_the__phar.../appendix.R | 1 + .../2024-03-11_tips_for__first_.../appendix.R | 1 + .../2024-04-15_de-_mystifying__.../appendix.R | 1 + .../2024-04-29_appsilon_and__sa.../appendix.R | 1 + 7 files changed, 16 insertions(+), 15 deletions(-) diff --git a/R/appendix.R b/R/appendix.R index 946a007a..ac352f6a 100644 --- a/R/appendix.R +++ b/R/appendix.R @@ -1,3 +1,4 @@ +library(dplyr) # markdown helpers -------------------------------------------------------- markdown_appendix <- function(name, content) { @@ -15,7 +16,8 @@ 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, @@ -23,7 +25,7 @@ insert_source <- function(repo_spec, name, branch, collection, name, - "index.qmd", + file_name, sep = "/" ) return(markdown_link(text, path)) @@ -39,17 +41,9 @@ 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)) } @@ -57,7 +51,7 @@ insert_lockfile <- function(repo_spec, name, # 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", @@ -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 = ", " ) diff --git a/posts/2024-02-13_teal_on_cran/appendix.R b/posts/2024-02-13_teal_on_cran/appendix.R index e7c62aaa..ac352f6a 100644 --- a/posts/2024-02-13_teal_on_cran/appendix.R +++ b/posts/2024-02-13_teal_on_cran/appendix.R @@ -1,3 +1,4 @@ +library(dplyr) # markdown helpers -------------------------------------------------------- markdown_appendix <- function(name, content) { diff --git a/posts/2024-02-14_iscr_conference/appendix.R b/posts/2024-02-14_iscr_conference/appendix.R index e7c62aaa..ac352f6a 100644 --- a/posts/2024-02-14_iscr_conference/appendix.R +++ b/posts/2024-02-14_iscr_conference/appendix.R @@ -1,3 +1,4 @@ +library(dplyr) # markdown helpers -------------------------------------------------------- markdown_appendix <- function(name, content) { diff --git a/posts/2024-03-04_inside_the__phar.../appendix.R b/posts/2024-03-04_inside_the__phar.../appendix.R index e7c62aaa..ac352f6a 100644 --- a/posts/2024-03-04_inside_the__phar.../appendix.R +++ b/posts/2024-03-04_inside_the__phar.../appendix.R @@ -1,3 +1,4 @@ +library(dplyr) # markdown helpers -------------------------------------------------------- markdown_appendix <- function(name, content) { diff --git a/posts/2024-03-11_tips_for__first_.../appendix.R b/posts/2024-03-11_tips_for__first_.../appendix.R index e7c62aaa..ac352f6a 100644 --- a/posts/2024-03-11_tips_for__first_.../appendix.R +++ b/posts/2024-03-11_tips_for__first_.../appendix.R @@ -1,3 +1,4 @@ +library(dplyr) # markdown helpers -------------------------------------------------------- markdown_appendix <- function(name, content) { diff --git a/posts/2024-04-15_de-_mystifying__.../appendix.R b/posts/2024-04-15_de-_mystifying__.../appendix.R index e7c62aaa..ac352f6a 100644 --- a/posts/2024-04-15_de-_mystifying__.../appendix.R +++ b/posts/2024-04-15_de-_mystifying__.../appendix.R @@ -1,3 +1,4 @@ +library(dplyr) # markdown helpers -------------------------------------------------------- markdown_appendix <- function(name, content) { diff --git a/posts/2024-04-29_appsilon_and__sa.../appendix.R b/posts/2024-04-29_appsilon_and__sa.../appendix.R index e7c62aaa..ac352f6a 100644 --- a/posts/2024-04-29_appsilon_and__sa.../appendix.R +++ b/posts/2024-04-29_appsilon_and__sa.../appendix.R @@ -1,3 +1,4 @@ +library(dplyr) # markdown helpers -------------------------------------------------------- markdown_appendix <- function(name, content) {