Skip to content

Commit

Permalink
explicitly namespace some more fxns
Browse files Browse the repository at this point in the history
  • Loading branch information
d-callan committed Nov 22, 2023
1 parent f948c84 commit d3cbdaf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ importFrom(DT,renderDT)
importFrom(bslib,bs_theme)
importFrom(r2d3,html_dependencies_d3)
importFrom(shinyjs,useShinyjs)
importFrom(stats,rnorm)
importFrom(utils,read.table)
6 changes: 4 additions & 2 deletions R/server.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ addRowNames <- function(corMat) {
}

#' @importFrom DT renderDT
#' @importFrom utils read.table
#' @importFrom stats rnorm
#' @import ggplot2
server <- function(input, output, session) {

Expand All @@ -26,7 +28,7 @@ server <- function(input, output, session) {

tryCatch({
if (fileExtension %in% c('tab','tsv')) {
matrixData <- read.table(file$datapath, header = TRUE, sep = '\t')
matrixData <- utils::read.table(file$datapath, header = TRUE, sep = '\t')
} else if (fileExtension == 'rds') {
matrixData <- readRDS(file$datapath)
} else {
Expand Down Expand Up @@ -67,7 +69,7 @@ server <- function(input, output, session) {
correlationMatrix <- req(correlationMatrix())
# todo fix this to take two data tables and find correlations and pvalues ourselves
# this is a placeholder
p_values <- abs(rnorm(length(correlationMatrix[lower.tri(correlationMatrix)]), .05, .5))*.0001
p_values <- abs(stats::rnorm(length(correlationMatrix[lower.tri(correlationMatrix)]), .05, .5))*.0001
return(p_values)
})

Expand Down

0 comments on commit d3cbdaf

Please sign in to comment.