Skip to content

Commit

Permalink
Better variable name for pca file.
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulJonasJost committed Jan 31, 2024
1 parent 0b7fd06 commit f0dd037
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions program/shinyApp/R/pca/server.R
Original file line number Diff line number Diff line change
Expand Up @@ -500,11 +500,11 @@ pca_Server <- function(id, data, params, row_select){
device = gsub("\\.","",input$file_ext_plot1)
)
on.exit({
TEST <- paste0(
pca_report_path <- paste0(
getwd(), "/www/", customTitle, Sys.time(), input$file_ext_plot1
)
ggsave(
filename = TEST,
filename = pca_report_path,
plot = pca_plot_final,
device = gsub("\\.","",input$file_ext_plot1)
)
Expand All @@ -513,7 +513,7 @@ pca_Server <- function(id, data, params, row_select){
fun_LogIt(message = "## PCA")
fun_LogIt(message = paste0("**PCA** - The following PCA-plot is colored after: ", input$coloring_options))
ifelse(input$Show_loadings=="Yes",fun_LogIt(message = paste0("PCA - Number of top Loadings added: ", length(TopK))),print("Args!"))
fun_LogIt(message = paste0("**PCA** - ![PCA](",TEST,")"))
fun_LogIt(message = paste0("**PCA** - ![PCA](",pca_report_path,")"))
})
}
)
Expand Down Expand Up @@ -739,9 +739,9 @@ pca_Server <- function(id, data, params, row_select){
observeEvent(input$only2Report_pca,{
# needs global var ?! do we want that?
notificationID <- showNotification("Saving...",duration = 0)
TEST <- paste0(getwd(), "/www/", customTitle, Sys.time(), ".png")
pca_report_path <- paste0(getwd(), "/www/", customTitle, Sys.time(), ".png")
ggsave(
TEST,
pca_report_path,
plot = pca_reactives$PCA_plot,
device = "png"
)
Expand All @@ -751,7 +751,7 @@ pca_Server <- function(id, data, params, row_select){
message = paste0("**PCA** - The following PCA-plot is colored after: ", input$coloring_options)
)
ifelse(input$Show_loadings == "Yes",fun_LogIt(message = paste0("PCA - Number of top Loadings added: ", length(TopK))),print(""))
fun_LogIt(message = paste0("**PCA** - ![PCA](",TEST,")"))
fun_LogIt(message = paste0("**PCA** - ![PCA](",pca_report_path,")"))
if(isTruthy(input$NotesPCA) & !(isEmpty(input$NotesPCA))){
fun_LogIt(message = "### Personal Notes:")
fun_LogIt(message = input$NotesPCA)
Expand Down

0 comments on commit f0dd037

Please sign in to comment.