Supplemental Results
Note: Supplemental Methods are supposed to go to beamtime pages
Links to protocol pages
Code
# | 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'
# Add location
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')
[1] "C:/Users/gorka/Gitlab_crs/fdcns/webpage_contents/synchrotron_microCT/SPring-8_May_2023/protocols"
[2] "C:/Users/gorka/Gitlab_crs/fdcns/webpage_contents/synchrotron_microCT/ESRF_01_Jan_0000/protocols"
Code
DT::datatable(paths, options = list(dom = 't'), escape = FALSE, rownames = FALSE, )
Synchrotron µCT Data
Code
# | warning: false
library(dplyr)
# Take the relevant rows from the tables specified in inputs
data_used <- list()
for (i in 1:nrow(inputs)){
row_filepath <- file.path(here::here(), 'experiments',inputs$Data_type[i], inputs$Facility_name_mon_YYYY[i], inputs$Metadata_file[i])
data_used[[i]] <- read.csv(row_filepath) %>% filter(SubjectID == inputs$SubjectID[i]) # read table and filter subject
}
# Gather list elements in a table
data_used <- do.call(rbind,data_used)
data_used$Subject_pubID <- inputs$Subject_pubID # Add additional input column
data_used <- relocate(data_used, Subject_pubID, .before = 1)
#Display table
DT::datatable(data_used, filter = 'top')
Back to top