Skip to content

Commit

Permalink
Simplying dependencies of Shiny app
Browse files Browse the repository at this point in the history
Co-authored-by: Gowtham Rao <rao@ohdsi.org>
Co-authored-by: Admin_mschuemi <Admin_mschuemi@its.jnj.com>
  • Loading branch information
3 people committed Oct 22, 2023
1 parent bb41024 commit 0f3d68f
Show file tree
Hide file tree
Showing 8 changed files with 390 additions and 291 deletions.
1 change: 0 additions & 1 deletion CohortExplorer.Rproj
Expand Up @@ -13,6 +13,5 @@ RnwWeave: Sweave
LaTeX: pdfLaTeX

BuildType: Package
PackageUseDevtools: Yes
PackageInstallArgs: --no-multiarch --with-keep.source
PackageRoxygenize: rd,collate,namespace
18 changes: 18 additions & 0 deletions inst/shiny/R/private.R
Expand Up @@ -30,3 +30,21 @@ readData <- function(databaseId,
return(NULL)
}
}


snakeCaseToCamelCase <- function(string) {
string <- tolower(string)
for (letter in letters) {
string <- gsub(paste("_", letter, sep = ""), toupper(letter), string)
}
string <- gsub("_([0-9])", "\\1", string)
return(string)
}

camelCaseToTitleCase <- function(string) {
string <- gsub("([A-Z])", " \\1", string)
string <- gsub("([a-z])([0-9])", "\\1 \\2", string)
substr(string, 1, 1) <- toupper(substr(string, 1, 1))
return(string)
}

0 comments on commit 0f3d68f

Please sign in to comment.