diff --git a/webpage_contents/templates/templates_for_publications/YYYYMMDD_Firstname_LastName/index.qmd b/webpage_contents/templates/templates_for_publications/YYYYMMDD_Firstname_LastName/index.qmd index 3855561b68404ec1ec7109556d8f315547b66ae6..7a4a5d75c2d95b2f8ae6314f31bc00a29f5bf1cf 100644 --- a/webpage_contents/templates/templates_for_publications/YYYYMMDD_Firstname_LastName/index.qmd +++ b/webpage_contents/templates/templates_for_publications/YYYYMMDD_Firstname_LastName/index.qmd @@ -16,6 +16,7 @@ author: code-fold: true --- + ```{r userinputs} #| output: false #| echo: false @@ -31,28 +32,32 @@ inputs <- read.csv(file = 'input_mice.csv') # Supplemental Results -Note: Supplemental Methods are supposed to go to beamtime pages - ## Links to protocol pages ```{r} # | warning: false -folders <- unique(cbind(inputs$Data_type,inputs$Facility_name_mon_YYYY)) #unique combination of experiment type and facility -paths <- as.data.frame(file.path(apply(folders, 1, paste, collapse = .Platform$file.sep), 'protocols')) #put together the paths rowwise -colnames(paths) <- 'Protocols' +library(dplyr) +# This code chunk gathers the rows from tables specified in the inputs +inputs <- read.csv(file = 'input_mice.csv') + +# Use data type and facility information to find the path to the relevant protocols +folders <- unique(cbind(inputs$Data_type,inputs$Facility_name_mon_YYYY)) # find table's unique variations of experiment type and facility +paths <- as.data.frame(file.path(apply(folders, 1, paste, collapse = .Platform$file.sep), 'protocols')) #put together the paths +colnames(paths) <- 'Protocols' -# Add location +# Add HTML code so that it becomes a clickable link paths$Protocols <- paste0('<a href=\'',paths$Protocols,'\' target=\'_blank\'>', paths$Protocols,'</a>') file.path(here::here(), apply(folders, 1, paste, collapse = .Platform$file.sep), 'protocols') +# Render table DT::datatable(paths, options = list(dom = 't'), escape = FALSE, rownames = FALSE, ) ``` -## Synchrotron µCT Data +## Mice information ```{r} # | warning: false @@ -69,7 +74,7 @@ for (i in 1:nrow(inputs)){ data_used <- do.call(rbind,data_used) data_used$Subject_pubID <- inputs$Subject_pubID # Add additional input column - +# add the subject index for publication as first variable data_used <- relocate(data_used, Subject_pubID, .before = 1) #Display table