r paste('#', basename(rawFileList[[i]]), '{data-navmenu="Raw Filename"}')

r shiny::tags$h2(basename(rawFileList[[i]]), style="text-align:center")

Column {.tabset .tabset-fade}

safeggplotly <- purrr::safely(plotly::ggplotly)

Total Ion Chromatograms, MS1

temp_ggplotly <- 
   safeggplotly(TIC_ms1[[i]])

if (is.null(temp_ggplotly[["result"]]) == FALSE) {

   suppressMessages(
      suppressWarnings(
         plotly::ggplotly(TIC_ms1[[i]]) %>% 
            plotly::style(
               line = list(
                  width = 1, 
                  color = "black"
               )
            ) %>% 
            plotly::config(
               displaylogo = FALSE,
               toImageButtonOptions = list(
                  format = "svg",
                  width = 800,
                  height = 500
               )
            ) 
      )
   )

} else {

   pander::pander("Error while creating plotly graph")

}

Total Ion Chromatograms, MS2

temp_ggplotly <- 
   safeggplotly(TIC_ms2[[i]])

if (is.null(temp_ggplotly[["result"]]) == FALSE) {

   suppressMessages(
      suppressWarnings(
         plotly::ggplotly(TIC_ms2[[i]]) %>% 
            plotly::style(
               line = list(
                  width = 1, 
                  color = "black"
               )
            ) %>% 
            plotly::config(
               displaylogo = FALSE,
               toImageButtonOptions = list(
                  format = "svg",
                  width = 800,
                  height = 500
               )
            ) 
      )
   )

} else {

   pander::pander("Error while creating plotly graph")

}

Base Peak Chromatograms, MS1

temp_ggplotly <- 
   safeggplotly(BPC_ms1[[i]])

if (is.null(temp_ggplotly[["result"]]) == FALSE) {

   suppressMessages(
      suppressWarnings(
         plotly::ggplotly(BPC_ms1[[i]]) %>% 
            plotly::style(
               line = list(
                  width = 1, 
                  color = "black"
               )
            ) %>% 
            plotly::config(
               displaylogo = FALSE,
               toImageButtonOptions = list(
                  format = "svg",
                  width = 800,
                  height = 500
               )
            ) 
      )
   )

} else {

   pander::pander("Error while creating plotly graph")

}

Base Peak Chromatograms, MS2

temp_ggplotly <- 
   safeggplotly(BPC_ms2[[i]])

if (is.null(temp_ggplotly[["result"]]) == FALSE) {

   suppressMessages(
      suppressWarnings(
         plotly::ggplotly(BPC_ms2[[i]]) %>% 
            plotly::style(
               line = list(
                  width = 1,
                  color = "black"
               )
            ) %>% 
            plotly::config(
               displaylogo = FALSE,
               toImageButtonOptions = list(
                  format = "svg",
                  width = 800,
                  height = 500
               )
            ) 
      )
   )


} else {

   pander::pander("Error while creating plotly graph")

}

Injection Times, MS1

temp_ggplotly <- 
   safeggplotly(injectionTime_ms1_plot[[i]])

if (is.null(temp_ggplotly[["result"]]) == FALSE) {

   suppressMessages(
      suppressWarnings(
         plotly::ggplotly(injectionTime_ms1_plot[[i]]) %>% 
            plotly::style(
               marker = list(
                  size = 4,
                  color = "black"
               )
            ) %>%
            plotly::config(
               displaylogo = FALSE,
               toImageButtonOptions = list(
                  format = "svg",
                  width = 800,
                  height = 500
               )
            ) 
      )
   )


} else {

   pander::pander("Error while creating plotly graph")

}

Injection Times, MS2

temp_ggplotly <- 
   safeggplotly(injectionTime_ms2_plot[[i]])

if (is.null(temp_ggplotly[["result"]]) == FALSE) {

   suppressWarnings(
      plotly::ggplotly(injectionTime_ms2_plot[[i]]) %>% 
         plotly::style(
            marker = list(
               size = 4,
               color = "black"
            )
         ) %>%
         plotly::config(
            displaylogo = FALSE,
            toImageButtonOptions = list(
               format = "svg",
               width = 800,
               height = 500
            )
         ) 
   )

} else {

   pander::pander("Error while creating plotly graph")

}


davidsbutcher/CRawFISh documentation built on July 7, 2021, 1:03 p.m.