From b121ad3fb97eabe5848d28a98f922009b1898f58 Mon Sep 17 00:00:00 2001 From: Janis Pagel Date: Thu, 17 Sep 2020 10:55:40 +0200 Subject: [PATCH 1/5] Add submodule for shiny app --- .gitmodules | 3 +++ DramaAnalysisWeb | 1 + 2 files changed, 4 insertions(+) create mode 100644 .gitmodules create mode 160000 DramaAnalysisWeb diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..2902398 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "DramaAnalysisWeb"] + path = DramaAnalysisWeb + url = https://github.com/quadrama/DramaAnalysisWeb diff --git a/DramaAnalysisWeb b/DramaAnalysisWeb new file mode 160000 index 0000000..6444381 --- /dev/null +++ b/DramaAnalysisWeb @@ -0,0 +1 @@ +Subproject commit 64443812ef2b1a1da19c89d24d64da08eecaa8db From f19dbd9581a1e5c7e48c797c9e266c06914fe731 Mon Sep 17 00:00:00 2001 From: Janis Pagel Date: Thu, 17 Sep 2020 12:31:21 +0200 Subject: [PATCH 2/5] Add convenience function to start shiny server --- DESCRIPTION | 3 ++- NAMESPACE | 2 ++ R/ui.R | 14 ++++++++++++++ man/exploreDramas.Rd | 24 ++++++++++++++++++++++++ 4 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 R/ui.R create mode 100644 man/exploreDramas.Rd diff --git a/DESCRIPTION b/DESCRIPTION index 2c42ad5..d524d16 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -25,7 +25,8 @@ Imports: git2r (>= 0.24.0), xml2 (>= 1.2.0), tokenizers (>= 0.2.1), - stringr (>= 1.4.0) + stringr (>= 1.4.0), + shiny (>= 1.5.0) Depends: R (>= 3.3.0) RoxygenNote: 6.1.1 diff --git a/NAMESPACE b/NAMESPACE index 61c92ba..b982b01 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -15,6 +15,7 @@ export(dictionaryStatistics) export(dictionaryStatisticsSingle) export(dramaNames) export(ensureSuffix) +export(exploreDramas) export(filterByDictionary) export(filterCharacters) export(frequencytable) @@ -50,6 +51,7 @@ exportClasses(QDDrama) exportClasses(QDHasCharacter) exportClasses(QDHasUtteranceBE) exportClasses(QDUtteranceStatistics) +import(shiny) import(xml2) importFrom(data.table,as.data.table) importFrom(data.table,data.table) diff --git a/R/ui.R b/R/ui.R new file mode 100644 index 0000000..093fab7 --- /dev/null +++ b/R/ui.R @@ -0,0 +1,14 @@ +#' @title Graphical User Interface +#' @description The function \code{exploreDramas()} opens a user interface that shows different analyses for the installed dramas in the form of interactive plots. +#' @param ... Provide arguments for shiny::runApp() +#' @return Shiny App +#' @rdname exploreDramas +#' @seealso \code{shiny} +#' @import shiny +#' @examples +#' exploreDramas(quiet = TRUE) +#' exploreDramas(launch.browser = TRUE) +#' @export +exploreDramas <- function(...) { + shiny::runApp(appDir = "../DramaAnalysisWeb", ...) +} diff --git a/man/exploreDramas.Rd b/man/exploreDramas.Rd new file mode 100644 index 0000000..f6a98b3 --- /dev/null +++ b/man/exploreDramas.Rd @@ -0,0 +1,24 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ui.R +\name{exploreDramas} +\alias{exploreDramas} +\title{Graphical User Interface} +\usage{ +exploreDramas(...) +} +\arguments{ +\item{...}{Provide arguments for shiny::runApp()} +} +\value{ +Shiny App +} +\description{ +The function \code{exploreDramas()} opens a user interface that shows different analyses for the installed dramas in the form of interactive plots. +} +\examples{ +exploreDramas(quiet = TRUE) +exploreDramas(launch.browser = TRUE) +} +\seealso{ +\code{shiny} +} From 9d77a206247577c888ed6b176ebbdce571c0a184 Mon Sep 17 00:00:00 2001 From: Janis Pagel Date: Thu, 17 Sep 2020 12:43:23 +0200 Subject: [PATCH 3/5] Update DramaAnalysisWeb --- DramaAnalysisWeb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DramaAnalysisWeb b/DramaAnalysisWeb index 6444381..0472ec0 160000 --- a/DramaAnalysisWeb +++ b/DramaAnalysisWeb @@ -1 +1 @@ -Subproject commit 64443812ef2b1a1da19c89d24d64da08eecaa8db +Subproject commit 0472ec0c3d4c564c659bf2dec75da4aea1f2f492 From 60d76d3d33b09c4b9f55faa8eac7780585d211ea Mon Sep 17 00:00:00 2001 From: Janis Pagel Date: Thu, 17 Sep 2020 16:55:27 +0200 Subject: [PATCH 4/5] Test if submodule was reason for travis timeout --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index ac40f49..609a04b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,3 +16,5 @@ matrix: os: osx cache: packages warnings_are_errors: false +git: + submodules: false From f7bd6a7edeb42c4a5fae0438ed9ee726d247af5c Mon Sep 17 00:00:00 2001 From: Janis Pagel Date: Tue, 22 Sep 2020 16:56:38 +0200 Subject: [PATCH 5/5] Revert "Test if submodule was reason for travis timeout" This reverts commit 60d76d3d33b09c4b9f55faa8eac7780585d211ea. --- .travis.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 609a04b..ac40f49 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,5 +16,3 @@ matrix: os: osx cache: packages warnings_are_errors: false -git: - submodules: false