Skip to content

Commit

Permalink
remove unneeded print statements
Browse files Browse the repository at this point in the history
  • Loading branch information
d-callan committed Nov 30, 2023
1 parent 0c69159 commit ddfbb27
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions R/server.R
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,11 @@ server <- function(input, output, session) {
lastData1ColIndex <- length(data1)
firstData2ColIndex <- length(data1) + 1
corrResult <- Hmisc::rcorr(as.matrix(data1), as.matrix(data2))
print(corrResult)

# this bc Hmisc::rcorr cbinds the two data.tables and runs the correlation
# so we need to extract only the relevant values
pValuesMatrix$p_values <- corrResult$P[1:lastData1ColIndex, firstData2ColIndex:length(colnames(corrResult$P))]
print(pValuesMatrix$p_values)
correlationMatrix$corr_matrix <- corrResult$r[1:lastData1ColIndex, firstData2ColIndex:length(colnames(corrResult$r))]
print(correlationMatrix$corr_matrix)
}, error = function(e) {
shiny::showNotification(paste('Error:', e$message), type = 'error')
})
Expand Down

0 comments on commit ddfbb27

Please sign in to comment.