From a975fbadf881743c008cf882d0a06bf2f86f32b5 Mon Sep 17 00:00:00 2001 From: SERDAR BALCI Date: Sun, 29 Mar 2020 15:18:52 +0300 Subject: [PATCH] 0004 release --- DESCRIPTION | 92 ++- NAMESPACE | 5 +- R/00jmv.R | 16 +- R/agreement.b.R | 5 +- R/agreement.h.R | 6 + R/competingsurvival.b.R | 18 + R/competingsurvival.h.R | 137 ++++ R/multisurvival.b.R | 5 + R/statsplot2.b.R | 117 ++- R/statsplot2.h.R | 27 +- R/statsplotbetween.b.R | 165 ++++ R/statsplotbetween.h.R | 142 ++++ R/survival.b.R | 15 +- R/tableone.b.R | 18 +- R/tree.b.R | 102 ++- R/tree.h.R | 93 +-- README.Rmd | 1 + README.html | 755 +++++++++++++++++++ README.md | 4 +- codemeta.json | 239 +++--- docs/404.html | 2 +- docs/LICENSE.html | 2 +- docs/articles/data-preperation.html | 2 +- docs/articles/index.html | 2 +- docs/articles/module_development_jamovi.html | 51 +- docs/articles/motivation.html | 2 +- docs/authors.html | 2 +- docs/index.html | 18 +- docs/news/index.html | 2 +- docs/reference/agreement.html | 3 +- docs/reference/competingsurvival.html | 215 ++++++ docs/reference/correlation.html | 2 +- docs/reference/crosstable.html | 2 +- docs/reference/decision.html | 2 +- docs/reference/decisioncalculator.html | 2 +- docs/reference/index.html | 14 +- docs/reference/multisurvival.html | 2 +- docs/reference/reportcat.html | 2 +- docs/reference/statsplot2.html | 8 +- docs/reference/statsplotbetween.html | 211 ++++++ docs/reference/summarydata.html | 2 +- docs/reference/survival.html | 2 +- docs/reference/tableone.html | 2 +- docs/reference/tree.html | 26 +- docs/sitemap.xml | 6 + jamovi/0000.yaml | 21 +- jamovi/00refs.yaml | 16 + jamovi/agreement.r.yaml | 4 + jamovi/competingsurvival.a.yaml | 37 + jamovi/competingsurvival.r.yaml | 11 + jamovi/competingsurvival.u.yaml | 34 + jamovi/multisurvival.a.yaml | 3 + jamovi/multisurvival.u.yaml | 2 +- jamovi/statsplot2.a.yaml | 14 + jamovi/statsplot2.r.yaml | 3 +- jamovi/statsplot2.u.yaml | 7 +- jamovi/statsplotbetween.a.yaml | 20 + jamovi/statsplotbetween.r.yaml | 42 ++ jamovi/statsplotbetween.u.yaml | 24 + jamovi/tree.a.yaml | 34 +- jamovi/tree.r.yaml | 26 +- jamovi/tree.u.yaml | 19 +- man/agreement.Rd | 1 + man/competingsurvival.Rd | 28 + man/statsplot2.Rd | 4 +- man/statsplotbetween.Rd | 28 + man/tree.Rd | 14 +- tododata/description.txt | 63 ++ tododata/statsplot21.txt | 353 +++++++++ tododata/todo.Rmd | 668 +++++++++++++++- vignettes/module_development_jamovi.Rmd | 32 + 71 files changed, 3637 insertions(+), 417 deletions(-) create mode 100644 R/competingsurvival.b.R create mode 100644 R/competingsurvival.h.R create mode 100644 R/statsplotbetween.b.R create mode 100644 R/statsplotbetween.h.R create mode 100644 README.html create mode 100644 docs/reference/competingsurvival.html create mode 100644 docs/reference/statsplotbetween.html create mode 100644 jamovi/competingsurvival.a.yaml create mode 100644 jamovi/competingsurvival.r.yaml create mode 100644 jamovi/competingsurvival.u.yaml create mode 100644 jamovi/statsplotbetween.a.yaml create mode 100644 jamovi/statsplotbetween.r.yaml create mode 100644 jamovi/statsplotbetween.u.yaml create mode 100644 man/competingsurvival.Rd create mode 100644 man/statsplotbetween.Rd create mode 100644 tododata/description.txt create mode 100644 tododata/statsplot21.txt diff --git a/DESCRIPTION b/DESCRIPTION index 27704faf4..e2b570a4b 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ -Package: ClinicoPath Type: Package +Package: ClinicoPath Title: Analysis for Clinicopathological Research -Version: 0.0.1.0002 -Date: 2020-03-17 +Version: 0.0.1.0004 +Date: 2020-03-29 Authors@R: person(given = "Serdar", family = "Balci", @@ -10,57 +10,67 @@ Authors@R: email = "drserdarbalci@gmail.com", comment = c(ORCID = "0000-0002-7852-3851")) Maintainer: Serdar Balci -Description: Analysis for Clinicopathological Research - ClinicoPath help researchers to generate natural language summaries of their - dataset, generate cross tables with statistical tests, and survival analysis - with survival tables, survival plots, and natural language summaries. +Description: Analysis for Clinicopathological Research + ClinicoPath help researchers to generate natural language summaries of + their dataset, generate cross tables with statistical tests, and + survival analysis with survival tables, survival plots, and natural + language summaries. License: GPL-3 -Encoding: UTF-8 -LazyData: true -Roxygen: list(markdown = TRUE) +URL: https://github.com/sbalci/ClinicoPathJamoviModule/, + https://sbalci.github.io/ClinicoPathJamoviModule/ +BugReports: + https://github.com/sbalci/ClinicoPathJamoviModule/issues/ Depends: R (>= 3.6) Imports: - jmvcore (>= 0.8.5), - R6, + caret, + correlation, dplyr, - survival, - survminer, + explore, + FFTrees, finalfit, - arsenal, - purrr, + forcats, + ggalluvial, + ggplot2, + ggstatsplot, glue, + irr, janitor, - ggplot2, - forcats, + jmvcore (>= 0.8.5), + jsonlite, + knitr, + networkD3, + purrr, + R6, + report, + rlang, + scales, + survival, + survminer, tableone, tangram, - rlang, - knitr, - remotes, + tibble, + tidyr, + utils +Suggests: + rmarkdown, + tidyselect, kableExtra, - ggstatsplot, - ggalluvial, - caret, - irr + yarrr, + circlize, + randomForest +VignetteBuilder: + knitr Remotes: - r-lib/tidyselect, + ndphillips/FFTrees, + easystats/parameters, + easystats/bayestestR, + easystats/effectsize, + easystats/correlation, easystats/modelbased, easystats/insight, - easystats/bayestestR, - easystats/performance, - easystats/parameters, easystats/report -Suggests: - effectsize, - emmeans, - rmarkdown, - igraph, - iterators, - rms, - commonmark, - sass +Encoding: UTF-8 +LazyData: true +Roxygen: list(markdown = TRUE) RoxygenNote: 7.0.2 -VignetteBuilder: knitr -URL: https://github.com/sbalci/ClinicoPathJamoviModule/, https://sbalci.github.io/ClinicoPathJamoviModule/ -BugReports: https://github.com/sbalci/ClinicoPathJamoviModule/issues/ diff --git a/NAMESPACE b/NAMESPACE index df0555ab4..c3df5025e 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,6 +1,7 @@ # Generated by roxygen2: do not edit by hand export(agreement) +export(competingsurvival) export(correlation) export(crosstable) export(decision) @@ -8,6 +9,7 @@ export(decisioncalculator) export(multisurvival) export(reportcat) export(statsplot2) +export(statsplotbetween) export(summarydata) export(survival) export(tableone) @@ -17,13 +19,10 @@ import(finalfit) import(ggalluvial) import(ggplot2) import(ggstatsplot) -import(gt) -import(gtsummary) import(jmvcore) import(networkD3) import(survival) import(survminer) -import(tidyselect) importFrom(R6,R6Class) importFrom(ggalluvial,StatStratum) importFrom(jmvcore,toNumeric) diff --git a/R/00jmv.R b/R/00jmv.R index e43ea1946..1d9c4b079 100644 --- a/R/00jmv.R +++ b/R/00jmv.R @@ -227,4 +227,18 @@ `year`=2019, `title`="ggalluvial: Alluvial Plots in 'ggplot2'.", `publisher`="[R package]. Retrieved from https://CRAN.R-project.org/package=ggalluvial", - `url`="https://CRAN.R-project.org/package=ggalluvial")) + `url`="https://CRAN.R-project.org/package=ggalluvial"), + `explore`=list( + `type`="software", + `author`="Roland Krasser", + `year`=2020, + `title`="explore: Simplifies Exploratory Data Analysis.", + `publisher`="[R package]. Retrieved from https://CRAN.R-project.org/package=explore", + `url`="https://CRAN.R-project.org/package=explore"), + `FFTrees`=list( + `type`="software", + `author`="Nathaniel Phillips, Hansjoerg Neth, Jan Woike and Wolfgang Gaissmaer", + `year`=2019, + `title`="FFTrees: Generate, Visualise, and Evaluate Fast-and-Frugal Decision Trees", + `publisher`="[R package]. Retrieved from https://CRAN.R-project.org/package=FFTrees", + `url`="https://CRAN.R-project.org/package=FFTrees")) diff --git a/R/agreement.b.R b/R/agreement.b.R index b663e71fe..e27e0345d 100644 --- a/R/agreement.b.R +++ b/R/agreement.b.R @@ -9,8 +9,6 @@ agreementClass <- if (requireNamespace('jmvcore')) R6::R6Class( .run = function() { - - if (length(self$options$vars) < 2) return() @@ -44,11 +42,14 @@ agreementClass <- if (requireNamespace('jmvcore')) R6::R6Class( dplyr::select(myvars) + result <- table(ratings[,1], ratings[,2]) + result1 <- irr::agree(ratings) result2 <- irr::kappa2(ratings) + self$results$text$setContent(result) self$results$text1$setContent(result1) diff --git a/R/agreement.h.R b/R/agreement.h.R index f325d48b2..c1321d97f 100644 --- a/R/agreement.h.R +++ b/R/agreement.h.R @@ -30,6 +30,7 @@ agreementResults <- if (requireNamespace('jmvcore')) R6::R6Class( inherit = jmvcore::Group, active = list( todo = function() private$.items[["todo"]], + text = function() private$.items[["text"]], text1 = function() private$.items[["text1"]], text2 = function() private$.items[["text2"]]), private = list(), @@ -44,6 +45,10 @@ agreementResults <- if (requireNamespace('jmvcore')) R6::R6Class( options=options, name="todo", title="To Do")) + self$add(jmvcore::Preformatted$new( + options=options, + name="text", + title="Table")) self$add(jmvcore::Preformatted$new( options=options, name="text1", @@ -86,6 +91,7 @@ agreementBase <- if (requireNamespace('jmvcore')) R6::R6Class( #' @return A results object containing: #' \tabular{llllll}{ #' \code{results$todo} \tab \tab \tab \tab \tab a preformatted \cr +#' \code{results$text} \tab \tab \tab \tab \tab a preformatted \cr #' \code{results$text1} \tab \tab \tab \tab \tab a preformatted \cr #' \code{results$text2} \tab \tab \tab \tab \tab a preformatted \cr #' } diff --git a/R/competingsurvival.b.R b/R/competingsurvival.b.R new file mode 100644 index 000000000..12f950afa --- /dev/null +++ b/R/competingsurvival.b.R @@ -0,0 +1,18 @@ + +# This file is a generated template, your changes will not be overwritten + +competingsurvivalClass <- if (requireNamespace('jmvcore')) R6::R6Class( + "competingsurvivalClass", + inherit = competingsurvivalBase, + private = list( + .run = function() { + + # https://finalfit.org/articles/survival.html#death-status + + + # `self$data` contains the data + # `self$options` contains the options + # `self$results` contains the results object (to populate) + + }) +) diff --git a/R/competingsurvival.h.R b/R/competingsurvival.h.R new file mode 100644 index 000000000..92ce9449d --- /dev/null +++ b/R/competingsurvival.h.R @@ -0,0 +1,137 @@ + +# This file is automatically generated, you probably don't want to edit this + +competingsurvivalOptions <- if (requireNamespace('jmvcore')) R6::R6Class( + "competingsurvivalOptions", + inherit = jmvcore::Options, + public = list( + initialize = function( + dep = NULL, + group = NULL, + alt = "notequal", + varEq = TRUE, ...) { + + super$initialize( + package='ClinicoPath', + name='competingsurvival', + requiresData=TRUE, + ...) + + private$..dep <- jmvcore::OptionVariable$new( + "dep", + dep) + private$..group <- jmvcore::OptionVariable$new( + "group", + group) + private$..alt <- jmvcore::OptionList$new( + "alt", + alt, + options=list( + "notequal", + "onegreater", + "twogreater"), + default="notequal") + private$..varEq <- jmvcore::OptionBool$new( + "varEq", + varEq, + default=TRUE) + + self$.addOption(private$..dep) + self$.addOption(private$..group) + self$.addOption(private$..alt) + self$.addOption(private$..varEq) + }), + active = list( + dep = function() private$..dep$value, + group = function() private$..group$value, + alt = function() private$..alt$value, + varEq = function() private$..varEq$value), + private = list( + ..dep = NA, + ..group = NA, + ..alt = NA, + ..varEq = NA) +) + +competingsurvivalResults <- if (requireNamespace('jmvcore')) R6::R6Class( + inherit = jmvcore::Group, + active = list( + text = function() private$.items[["text"]]), + private = list(), + public=list( + initialize=function(options) { + super$initialize( + options=options, + name="", + title="Competing Survival") + self$add(jmvcore::Preformatted$new( + options=options, + name="text", + title="Competing Survival"))})) + +competingsurvivalBase <- if (requireNamespace('jmvcore')) R6::R6Class( + "competingsurvivalBase", + inherit = jmvcore::Analysis, + public = list( + initialize = function(options, data=NULL, datasetId="", analysisId="", revision=0) { + super$initialize( + package = 'ClinicoPath', + name = 'competingsurvival', + version = c(1,0,0), + options = options, + results = competingsurvivalResults$new(options=options), + data = data, + datasetId = datasetId, + analysisId = analysisId, + revision = revision, + pause = NULL, + completeWhenFilled = FALSE) + })) + +#' Competing Survival +#' +#' +#' @param data . +#' @param dep . +#' @param group . +#' @param alt . +#' @param varEq . +#' @return A results object containing: +#' \tabular{llllll}{ +#' \code{results$text} \tab \tab \tab \tab \tab a preformatted \cr +#' } +#' +#' @export +competingsurvival <- function( + data, + dep, + group, + alt = "notequal", + varEq = TRUE) { + + if ( ! requireNamespace('jmvcore')) + stop('competingsurvival requires jmvcore to be installed (restart may be required)') + + if ( ! missing(dep)) dep <- jmvcore::resolveQuo(jmvcore::enquo(dep)) + if ( ! missing(group)) group <- jmvcore::resolveQuo(jmvcore::enquo(group)) + if (missing(data)) + data <- jmvcore::marshalData( + parent.frame(), + `if`( ! missing(dep), dep, NULL), + `if`( ! missing(group), group, NULL)) + + + options <- competingsurvivalOptions$new( + dep = dep, + group = group, + alt = alt, + varEq = varEq) + + analysis <- competingsurvivalClass$new( + options = options, + data = data) + + analysis$run() + + analysis$results +} diff --git a/R/multisurvival.b.R b/R/multisurvival.b.R index 2fc019e4c..14fd60fe5 100644 --- a/R/multisurvival.b.R +++ b/R/multisurvival.b.R @@ -13,6 +13,7 @@ multisurvivalClass <- if (requireNamespace('jmvcore')) R6::R6Class( private = list( .run = function() { + if (nrow(self$data) == 0) stop('Data contains no (complete) rows') @@ -55,6 +56,10 @@ multisurvivalClass <- if (requireNamespace('jmvcore')) R6::R6Class( myoutcome2 <- self$options$outcome myoutcome2 <- self$data[[myoutcome2]] myoutcome2 <- na.omit(myoutcome2) + + if(class(myoutcome2) == "factor") + stop("Please use a continuous variable for outcome.") + if (any(myoutcome2 != 0 & myoutcome2 != 1)) stop('Outcome variable must only contains 1s and 0s. If patient is dead or event (recurrence) occured it is 1. If censored (patient is alive or free of disease) at the last visit it is 0.') diff --git a/R/statsplot2.b.R b/R/statsplot2.b.R index 9a972274d..090d97dc6 100644 --- a/R/statsplot2.b.R +++ b/R/statsplot2.b.R @@ -3,13 +3,8 @@ #' @import ggplot2 #' @import ggstatsplot #' @import ggalluvial -#' @import networkD3 #' @importFrom rlang .data #' @importFrom ggalluvial StatStratum -# @importClassesFrom ggplot2 -# @importClassesFrom ggalluvial -# @importMethodsFrom ggalluvial -# @importMethodsFrom ggplot2 # @@ -21,7 +16,7 @@ statsplot2Class <- if (requireNamespace('jmvcore')) R6::R6Class( StatStratum <- ggalluvial::StatStratum - # TODO + # TODO ---- todo <- glue::glue( "This Module is still under development @@ -36,17 +31,31 @@ statsplot2Class <- if (requireNamespace('jmvcore')) R6::R6Class( if (is.null(self$options$dep) || is.null(self$options$group)) return() + if (nrow(self$data) == 0) + stop('Data contains no (complete) rows') + mydata <- self$data mydep <- self$data[[self$options$dep]] mygroup <- self$data[[self$options$group]] + contin <- c("integer", "numeric", "double") + categ <- c("factor") + + distribution <- self$options$distribution + distribution <- jmvcore::composeTerm(distribution) + + direction <- self$options$direction + direction <- jmvcore::composeTerm(direction) + klass <- print( list( "mydep" = c(typeof(mydep), class(mydep)), - "mygroup" = c(typeof(mygroup), class(mygroup)) + "mydep2" = c(inherits(mydep, "factor"), inherits(mydep, "character"), inherits(mydep, "integer"), inherits(mydep, "numeric"), inherits(mydep, contin)), + "mygroup" = c(typeof(mygroup), class(mygroup)), + "a" = c(distribution, direction) ) ) @@ -54,29 +63,28 @@ statsplot2Class <- if (requireNamespace('jmvcore')) R6::R6Class( self$results$text1$setContent(klass) - plotData <- data.frame(gr = mygroup, - dp = mydep) - plotData <- jmvcore::naOmit(plotData) - mydata_changes <- plotData %>% - dplyr::group_by(gr, dp) %>% - dplyr::tally(x = .) + # plotData <- data.frame(gr = mygroup, + # dp = mydep) + # plotData <- jmvcore::naOmit(plotData) + # mydata_changes <- plotData %>% + # dplyr::group_by(gr, dp) %>% + # dplyr::tally(x = .) - self$results$text2$setContent(mydata_changes) + # self$results$text2$setContent(mydata_changes) - plotData <- data.frame(gr = mygroup, - dp = mydep) + # plotData <- data.frame(gr = mygroup, + # dp = mydep) + # plotData <- jmvcore::naOmit(plotData) - plotData <- jmvcore::naOmit(plotData) + # mydata_changes <- plotData %>% + # dplyr::group_by(gr, dp) %>% + # dplyr::tally(x = .) - mydata_changes <- plotData %>% - dplyr::group_by(gr, dp) %>% - dplyr::tally(x = .) - - deneme <- ggalluvial::is_alluvia_form( - as.data.frame(mydata_changes), - axes = 1:2, silent = TRUE) + # deneme <- ggalluvial::is_alluvia_form( + # as.data.frame(mydata_changes), + # axes = 1:2, silent = TRUE) # nodes = data.frame("name" = # c(self$options$group, @@ -93,21 +101,26 @@ statsplot2Class <- if (requireNamespace('jmvcore')) R6::R6Class( - self$results$text3$setContent(deneme) + # self$results$text3$setContent(deneme) + # independent, factor, continuous ---- }, - .plot = function(image, ...) { # <-- the plot function + .plot = function(image, ...) { # <-- the plot function ---- if (is.null(self$options$dep) || is.null(self$options$group)) return() + if (nrow(self$data) == 0) + stop('Data contains no (complete) rows') + direction <- self$options$direction - # typex <- self$options$typex - # typey <- self$options$typey + + + distribution <- jmvcore::constructFormula(terms = self$options$distribution) mydata <- self$data @@ -118,12 +131,14 @@ statsplot2Class <- if (requireNamespace('jmvcore')) R6::R6Class( contin <- c("integer", "numeric", "double") categ <- c("factor") + # independent ---- - if (direction == "independent") { + # independent, factor, continuous ---- + if (direction == "independent") { - if (class(mygroup) == "factor" && class(mydep) %in% contin) { + if (inherits(mygroup, "factor") && inherits(mydep, contin)) { # ggbetweenstats violin plots for comparisons between groups/conditions @@ -134,12 +149,15 @@ statsplot2Class <- if (requireNamespace('jmvcore')) R6::R6Class( plot <- ggstatsplot::ggbetweenstats( data = plotData, x = gr, - y = dp + y = dp, + type = distribution ) - } else if (class(mygroup) %in% contin && class(mydep) %in% contin) { + # independent, continuous, continuous ---- + + } else if (inherits(mygroup, contin) && inherits(mydep, contin)) { - # ggscatterstats scatterplots for correlations between two variables + # ggscatterstats scatterplots for correlations between two variables plotData <- data.frame(gr = jmvcore::toNumeric(mygroup), dp = jmvcore::toNumeric(mydep)) @@ -151,7 +169,9 @@ statsplot2Class <- if (requireNamespace('jmvcore')) R6::R6Class( y = dp ) - } else if (class(mygroup) == "factor" && class(mydep) == "factor") { + # independent, factor, factor ---- + + } else if (inherits(mygroup, "factor") && inherits(mydep, "factor")) { # ggbarstats bar charts for categorical data @@ -167,16 +187,21 @@ statsplot2Class <- if (requireNamespace('jmvcore')) R6::R6Class( condition = dp ) + # independent, continuous, factor ---- - } else if (class(mygroup) %in% contin && class(mydep) == "factor") { + } else if (inherits(mygroup, contin) && inherits(mydep, "factor")) { plot <- "Not Available" } + # repeated ---- + } else if (direction == "repeated") { - if (class(mygroup) == "factor" && class(mydep) %in% contin) { + # repeated, factor, continuous ---- + + if (inherits(mygroup, "factor") && inherits(mydep, contin)) { # ggwithinstats violin plots for comparisons within groups/conditions @@ -188,10 +213,14 @@ statsplot2Class <- if (requireNamespace('jmvcore')) R6::R6Class( plot <- ggstatsplot::ggwithinstats( data = plotData, x = gr, - y = dp + y = dp, + type = distribution ) - } else if (class(mygroup) %in% contin && class(mydep) %in% contin) { + # repeated, continuous, continuous ---- + + + } else if (inherits(mygroup, contin) && inherits(mydep, contin)) { plot <- c("Not Available") @@ -216,9 +245,11 @@ statsplot2Class <- if (requireNamespace('jmvcore')) R6::R6Class( + # repeated, factor, factor ---- + - } else if (class(mygroup) == "factor" && class(mydep) == "factor") { + } else if (inherits(mygroup, "factor") && inherits(mydep, "factor")) { # http://corybrunson.github.io/ggalluvial/ @@ -316,9 +347,10 @@ statsplot2Class <- if (requireNamespace('jmvcore')) R6::R6Class( # plot <- list(plot1, # plot2) + # repeated, continuous, factor ---- - } else if (class(mygroup) %in% contin && class(mydep) == "factor") { + } else if (inherits(mygroup, contin) && inherits(mydep, "factor")) { plot <- c("Not Available") @@ -330,5 +362,8 @@ statsplot2Class <- if (requireNamespace('jmvcore')) R6::R6Class( print(plot) TRUE - }) + } + + + ) ) diff --git a/R/statsplot2.h.R b/R/statsplot2.h.R index c2669d1b2..39ad31e66 100644 --- a/R/statsplot2.h.R +++ b/R/statsplot2.h.R @@ -8,7 +8,8 @@ statsplot2Options <- if (requireNamespace('jmvcore')) R6::R6Class( initialize = function( dep = NULL, group = NULL, - direction = "independent", ...) { + direction = "independent", + distribution = "p", ...) { super$initialize( package='ClinicoPath', @@ -29,19 +30,29 @@ statsplot2Options <- if (requireNamespace('jmvcore')) R6::R6Class( "repeated", "independent"), default="independent") + private$..distribution <- jmvcore::OptionList$new( + "distribution", + distribution, + options=list( + "p", + "np"), + default="p") self$.addOption(private$..dep) self$.addOption(private$..group) self$.addOption(private$..direction) + self$.addOption(private$..distribution) }), active = list( dep = function() private$..dep$value, group = function() private$..group$value, - direction = function() private$..direction$value), + direction = function() private$..direction$value, + distribution = function() private$..distribution$value), private = list( ..dep = NA, ..group = NA, - ..direction = NA) + ..direction = NA, + ..distribution = NA) ) statsplot2Results <- if (requireNamespace('jmvcore')) R6::R6Class( @@ -90,8 +101,7 @@ statsplot2Results <- if (requireNamespace('jmvcore')) R6::R6Class( "dep", "group", "direction", - "typex", - "typey")))})) + "distribution")))})) statsplot2Base <- if (requireNamespace('jmvcore')) R6::R6Class( "statsplot2Base", @@ -119,6 +129,7 @@ statsplot2Base <- if (requireNamespace('jmvcore')) R6::R6Class( #' @param dep . #' @param group . #' @param direction select measurement type (repeated or independent) +#' @param distribution select distribution type (parametric or nonparametric) #' @return A results object containing: #' \tabular{llllll}{ #' \code{results$todo} \tab \tab \tab \tab \tab a preformatted \cr @@ -133,7 +144,8 @@ statsplot2 <- function( data, dep, group, - direction = "independent") { + direction = "independent", + distribution = "p") { if ( ! requireNamespace('jmvcore')) stop('statsplot2 requires jmvcore to be installed (restart may be required)') @@ -150,7 +162,8 @@ statsplot2 <- function( options <- statsplot2Options$new( dep = dep, group = group, - direction = direction) + direction = direction, + distribution = distribution) analysis <- statsplot2Class$new( options = options, diff --git a/R/statsplotbetween.b.R b/R/statsplotbetween.b.R new file mode 100644 index 000000000..520e2f298 --- /dev/null +++ b/R/statsplotbetween.b.R @@ -0,0 +1,165 @@ +#' @importFrom R6 R6Class +#' @import jmvcore +#' @import networkD3 + +# This file is a generated template, your changes will not be overwritten + +statsplotbetweenClass <- if (requireNamespace('jmvcore')) R6::R6Class( + "statsplotbetweenClass", + inherit = statsplotbetweenBase, + private = list( + .run = function() { + + + + if (is.null(self$options$dep) || is.null(self$options$group)) + return() + + if (nrow(self$data) == 0) + stop('Data contains no (complete) rows') + + + mydata <- self$data + + mydep <- self$data[[self$options$dep]] + + mygroup <- self$data[[self$options$group]] + + plotData <- data.frame(gr = mygroup, + dp = mydep) + + plotData <- jmvcore::naOmit(plotData) + + + mydata_changes <- plotData %>% + dplyr::group_by(gr, dp) %>% + dplyr::tally(x = .) + + + nodes = data.frame("name" = + c(self$options$group, + self$options$dep)) + + links <- mydata_changes + + names(links) = c("source", "target", "value") + + + self$results$text1$setContent(nodes) + + self$results$text2$setContent(links) + + + # plothtml <- networkD3::sankeyNetwork(Links = links, Nodes = nodes, + # Source = "source", Target = "target", + # Value = "value", NodeID = "name", + # fontSize= 12, nodeWidth = 30) + + + # Load energy projection data + # Load energy projection data + URL <- paste0( + "https://cdn.rawgit.com/christophergandrud/networkD3/", + "master/JSONdata/energy.json") + Energy <- jsonlite::fromJSON(URL) + # Plot + plothtml <- networkD3::sankeyNetwork( + Links = Energy$links, + Nodes = Energy$nodes, + Source = "source", + Target = "target", Value = "value", NodeID = "name", + units = "TWh", fontSize = 12, nodeWidth = 30) + + + self$results$plothtml$setContent(plothtml) + + + # library(networkD3) + # nodes = data.frame("name" = + # c("Node A", # Node 0 + # "Node B", # Node 1 + # "Node C", # Node 2 + # "Node D"))# Node 3 + # links = as.data.frame(matrix(c( + # 0, 1, 10, # Each row represents a link. The first number + # 0, 2, 20, # represents the node being conntected from. + # 1, 3, 30, # the second number represents the node connected to. + # 2, 3, 40),# The third number is the value of the node + # byrow = TRUE, ncol = 3)) + # names(links) = c("source", "target", "value") + # sankeyNetwork(Links = links, Nodes = nodes, + # Source = "source", Target = "target", + # Value = "value", NodeID = "name", + # fontSize= 12, nodeWidth = 30) + + } + + , + + .plot = function(image, ...) { # <-- the plot function ---- + + + if (is.null(self$options$dep) || is.null(self$options$group)) + return() + + if (nrow(self$data) == 0) + stop('Data contains no (complete) rows') + + + + mydata <- self$data + + mydep <- self$data[[self$options$dep]] + + mygroup <- self$data[[self$options$group]] + + plotData <- data.frame(gr = mygroup, + dp = mydep) + + plotData <- jmvcore::naOmit(plotData) + + + mydata_changes <- plotData %>% + dplyr::group_by(gr, dp) %>% + dplyr::tally(x = .) + + + nodes = data.frame("name" = + c(self$options$group, + self$options$dep)) + + links <- mydata_changes + + names(links) = c("source", "target", "value") + + # plot <- networkD3::sankeyNetwork(Links = links, Nodes = nodes, + # Source = "source", Target = "target", + # Value = "value", NodeID = "name", + # fontSize= 12, nodeWidth = 30) + + + + # Load energy projection data + # Load energy projection data + URL <- paste0( + "https://cdn.rawgit.com/christophergandrud/networkD3/", + "master/JSONdata/energy.json") + Energy <- jsonlite::fromJSON(URL) + # Plot + plot <- networkD3::sankeyNetwork( + Links = Energy$links, + Nodes = Energy$nodes, + Source = "source", + Target = "target", Value = "value", NodeID = "name", + units = "TWh", fontSize = 12, nodeWidth = 30) + + + print(plot) + TRUE + + + } + + + ) +) diff --git a/R/statsplotbetween.h.R b/R/statsplotbetween.h.R new file mode 100644 index 000000000..6400c6181 --- /dev/null +++ b/R/statsplotbetween.h.R @@ -0,0 +1,142 @@ + +# This file is automatically generated, you probably don't want to edit this + +statsplotbetweenOptions <- if (requireNamespace('jmvcore')) R6::R6Class( + "statsplotbetweenOptions", + inherit = jmvcore::Options, + public = list( + initialize = function( + dep = NULL, + group = NULL, ...) { + + super$initialize( + package='ClinicoPath', + name='statsplotbetween', + requiresData=TRUE, + ...) + + private$..dep <- jmvcore::OptionVariable$new( + "dep", + dep) + private$..group <- jmvcore::OptionVariable$new( + "group", + group) + + self$.addOption(private$..dep) + self$.addOption(private$..group) + }), + active = list( + dep = function() private$..dep$value, + group = function() private$..group$value), + private = list( + ..dep = NA, + ..group = NA) +) + +statsplotbetweenResults <- if (requireNamespace('jmvcore')) R6::R6Class( + inherit = jmvcore::Group, + active = list( + text = function() private$.items[["text"]], + text1 = function() private$.items[["text1"]], + text2 = function() private$.items[["text2"]], + plothtml = function() private$.items[["plothtml"]], + plot = function() private$.items[["plot"]]), + private = list(), + public=list( + initialize=function(options) { + super$initialize( + options=options, + name="", + title="Stats Plot Between") + self$add(jmvcore::Preformatted$new( + options=options, + name="text", + title="Stats Plot Between")) + self$add(jmvcore::Preformatted$new( + options=options, + name="text1", + title="Text1")) + self$add(jmvcore::Preformatted$new( + options=options, + name="text2", + title="Text2")) + self$add(jmvcore::Html$new( + options=options, + name="plothtml", + title="plothtml")) + self$add(jmvcore::Image$new( + options=options, + title="D3", + name="plot", + width=600, + height=450, + renderFun=".plot", + requiresData=TRUE, + clearWith=list( + "dep", + "group")))})) + +statsplotbetweenBase <- if (requireNamespace('jmvcore')) R6::R6Class( + "statsplotbetweenBase", + inherit = jmvcore::Analysis, + public = list( + initialize = function(options, data=NULL, datasetId="", analysisId="", revision=0) { + super$initialize( + package = 'ClinicoPath', + name = 'statsplotbetween', + version = c(1,0,0), + options = options, + results = statsplotbetweenResults$new(options=options), + data = data, + datasetId = datasetId, + analysisId = analysisId, + revision = revision, + pause = NULL, + completeWhenFilled = FALSE) + })) + +#' Stats Plot Between +#' +#' +#' @param data . +#' @param dep . +#' @param group . +#' @return A results object containing: +#' \tabular{llllll}{ +#' \code{results$text} \tab \tab \tab \tab \tab a preformatted \cr +#' \code{results$text1} \tab \tab \tab \tab \tab a preformatted \cr +#' \code{results$text2} \tab \tab \tab \tab \tab a preformatted \cr +#' \code{results$plothtml} \tab \tab \tab \tab \tab a html \cr +#' \code{results$plot} \tab \tab \tab \tab \tab an image \cr +#' } +#' +#' @export +statsplotbetween <- function( + data, + dep, + group) { + + if ( ! requireNamespace('jmvcore')) + stop('statsplotbetween requires jmvcore to be installed (restart may be required)') + + if ( ! missing(dep)) dep <- jmvcore::resolveQuo(jmvcore::enquo(dep)) + if ( ! missing(group)) group <- jmvcore::resolveQuo(jmvcore::enquo(group)) + if (missing(data)) + data <- jmvcore::marshalData( + parent.frame(), + `if`( ! missing(dep), dep, NULL), + `if`( ! missing(group), group, NULL)) + + + options <- statsplotbetweenOptions$new( + dep = dep, + group = group) + + analysis <- statsplotbetweenClass$new( + options = options, + data = data) + + analysis$run() + + analysis$results +} diff --git a/R/survival.b.R b/R/survival.b.R index da3517e23..979906715 100644 --- a/R/survival.b.R +++ b/R/survival.b.R @@ -291,17 +291,6 @@ survivalClass <- if (requireNamespace('jmvcore')) R6::R6Class( - - - - - - - - - - - # results 7 1,3,5-yr survival summary ---- km_fit_df %>% @@ -327,7 +316,7 @@ survivalClass <- if (requireNamespace('jmvcore')) R6::R6Class( } else { - formula_p <- paste(myformula, ' ~ ', formula2) + formula_p <- paste0('survival::Surv(', formulaL, ',', formulaR, ') ~ ', formula2) formula_p <- as.formula(formula_p) results8 <- survminer::pairwise_survdiff( @@ -339,7 +328,7 @@ survivalClass <- if (requireNamespace('jmvcore')) R6::R6Class( - mypairwise2 <- as.data.frame(results8[["p.value"]]) %>% + mypairwise2 <- as.data.frame(results8[["p.value"]]) %>% tibble::rownames_to_column() mypairwise2 %>% diff --git a/R/tableone.b.R b/R/tableone.b.R index ae0471b9f..d7d81efa4 100644 --- a/R/tableone.b.R +++ b/R/tableone.b.R @@ -1,10 +1,9 @@ #' @importFrom R6 R6Class #' @importFrom jmvcore toNumeric -#' @importFrom tableone CreateTableOne #' @import dplyr -#' @import tidyselect -#' @import gt -#' @import gtsummary +#' @importFrom tableone CreateTableOne +#' + tableoneClass <- if (requireNamespace('jmvcore')) R6::R6Class( "tableoneClass", @@ -26,6 +25,7 @@ tableoneClass <- if (requireNamespace('jmvcore')) R6::R6Class( html <- self$results$todo html$setContent(todo) return() + } else { todo <- "" @@ -41,16 +41,6 @@ tableoneClass <- if (requireNamespace('jmvcore')) R6::R6Class( self$results$text1$setContent(mytableone) - # gtsummary - - # myvars <- jmvcore::constructFormula(terms = self$options$vars) - # myvars <- jmvcore::decomposeFormula(formula = myvars) - # myvars <- unlist(myvars) - # mytableone2 <- self$data %>% - # dplyr::select(myvars) - # mytableone2 <- gtsummary::tbl_summary(mytableone2) - # self$results$text2$setContent(mytableone2) - } }) diff --git a/R/tree.b.R b/R/tree.b.R index b49584570..f0c0be56e 100644 --- a/R/tree.b.R +++ b/R/tree.b.R @@ -1,6 +1,6 @@ #' @importFrom R6 R6Class #' @importFrom jmvcore toNumeric -# This file is a generated template, your changes will not be overwritten + treeClass <- if (requireNamespace('jmvcore')) R6::R6Class( "treeClass", @@ -8,8 +8,6 @@ treeClass <- if (requireNamespace('jmvcore')) R6::R6Class( private = list( .run = function() { - - # TODO todo <- glue::glue( @@ -23,66 +21,108 @@ treeClass <- if (requireNamespace('jmvcore')) R6::R6Class( self$results$todo$setContent(todo) - #### + if (is.null(self$options$vars) || is.null(self$options$target)) + return() + # prepare data for explore ---- + # https://cran.r-project.org/web/packages/explore/vignettes/explore.html - # if (length(self$options$dep) + length(self$options$group) < 2) - # return() + # image <- self$results$plot + # image$setState(plotData) - # https://cran.r-project.org/web/packages/explore/vignettes/explore.html + }, - # mydata <- self$data + .plot = function(image, ...) { # <-- the plot function ---- - # mydep <- self$data[[self$options$dep]] - # mygroup <- self$data[[self$options$group]] + if (is.null(self$options$vars) || is.null(self$options$target)) + return() + mydata <- self$data + myvars <- self$options$vars + mytarget <- self$options$target - # plotData <- data.frame(gr = mygroup, dp = jmvcore::toNumeric(mydep)) - # plotData <- jmvcore::naOmit(plotData) + xtarget <- jmvcore::composeTerm(components = self$options$target) + mydata <- jmvcore::naOmit(mydata) - # image <- self$results$plot + mydata <- mydata %>% + dplyr::select(mytarget, myvars) - # image$setState(plotData) + plot <- mydata %>% + explore::explain_tree(data = ., + target = .data[[xtarget]]) + print(plot) + TRUE - # `self$data` contains the data - # `self$options` contains the options - # `self$results` contains the results object (to populate) }, - .plot=function(image, ...) { # <-- the plot function + .plot2 = function(image, ...) { # <-- the plot2 function ---- - # if (length(self$options$dep) + length(self$options$group) < 2) - # return() + if (is.null(self$options$vars) || is.null(self$options$target)) + return() + mydata <- self$data + myvars <- self$options$vars + mytarget <- self$options$target - # plotData <- image$state + mydata <- jmvcore::naOmit(mydata) + mydata <- mydata %>% + dplyr::select(mytarget, myvars) + # plot <- mydata %>% + # explore::explain_tree(data = ., + # target = .data[[xtarget]]) - tree1 <- iris %>% explore::explain_tree(target = Species) - iris$is_versicolor <- ifelse(iris$Species == "versicolor", 1, 0) + formula <- jmvcore::constructFormula(terms = self$options$target) - tree2 <- iris %>% - dplyr::select(-Species) %>% - explore::explain_tree(target = is_versicolor) + formula <- paste(formula, '~ .') - tree3 <- iris %>% - explore::explain_tree(target = Sepal.Length) + formula <- as.formula(formula) - plot <- tree2 + # Create an FFTrees object from the data + FFTrees.fft <- FFTrees::FFTrees( + formula = formula, + data = mydata + ) - print(plot) + # Plot the best tree applied to the test data + plot2 <- plot(FFTrees.fft, + data = mydata + # , + # main = "Heart Disease", + # decision.labels = c("Healthy", "Disease") + ) + + + # Create an FFTrees object from the heartdisease data + # iris.fft <- FFTrees::FFTrees(formula = Species ~., + # data = iris) + # Plot the best tree applied to the test data + # plot <- plot(iris.fft, + # data = "iris", + # main = "iris") + + + + + + print(plot2) TRUE - }) + } + + + + + ) ) diff --git a/R/tree.h.R b/R/tree.h.R index 8d3da8ac6..273282115 100644 --- a/R/tree.h.R +++ b/R/tree.h.R @@ -6,10 +6,8 @@ treeOptions <- if (requireNamespace('jmvcore')) R6::R6Class( inherit = jmvcore::Options, public = list( initialize = function( - dep = NULL, - group = NULL, - alt = "notequal", - varEq = TRUE, ...) { + vars = NULL, + target = NULL, ...) { super$initialize( package='ClinicoPath', @@ -17,40 +15,22 @@ treeOptions <- if (requireNamespace('jmvcore')) R6::R6Class( requiresData=TRUE, ...) - private$..dep <- jmvcore::OptionVariable$new( - "dep", - dep) - private$..group <- jmvcore::OptionVariable$new( - "group", - group) - private$..alt <- jmvcore::OptionList$new( - "alt", - alt, - options=list( - "notequal", - "onegreater", - "twogreater"), - default="notequal") - private$..varEq <- jmvcore::OptionBool$new( - "varEq", - varEq, - default=TRUE) + private$..vars <- jmvcore::OptionVariables$new( + "vars", + vars) + private$..target <- jmvcore::OptionVariable$new( + "target", + target) - self$.addOption(private$..dep) - self$.addOption(private$..group) - self$.addOption(private$..alt) - self$.addOption(private$..varEq) + self$.addOption(private$..vars) + self$.addOption(private$..target) }), active = list( - dep = function() private$..dep$value, - group = function() private$..group$value, - alt = function() private$..alt$value, - varEq = function() private$..varEq$value), + vars = function() private$..vars$value, + target = function() private$..target$value), private = list( - ..dep = NA, - ..group = NA, - ..alt = NA, - ..varEq = NA) + ..vars = NA, + ..target = NA) ) treeResults <- if (requireNamespace('jmvcore')) R6::R6Class( @@ -58,7 +38,7 @@ treeResults <- if (requireNamespace('jmvcore')) R6::R6Class( active = list( todo = function() private$.items[["todo"]], text1 = function() private$.items[["text1"]], - plot = function() private$.items[["plot"]]), + plot2 = function() private$.items[["plot2"]]), private = list(), public=list( initialize=function(options) { @@ -66,7 +46,9 @@ treeResults <- if (requireNamespace('jmvcore')) R6::R6Class( options=options, name="", title="Decision Tree", - refs="explore") + refs=list( + "explore", + "FFTrees")) self$add(jmvcore::Preformatted$new( options=options, name="todo", @@ -77,10 +59,15 @@ treeResults <- if (requireNamespace('jmvcore')) R6::R6Class( title="Decision Tree")) self$add(jmvcore::Image$new( options=options, - name="plot", + name="plot2", + title="FFTrees", width=600, height=450, - renderFun=".plot"))})) + renderFun=".plot2", + requiresData=TRUE, + clearWith=list( + "vars", + "target")))})) treeBase <- if (requireNamespace('jmvcore')) R6::R6Class( "treeBase", @@ -103,44 +90,38 @@ treeBase <- if (requireNamespace('jmvcore')) R6::R6Class( #' Decision Tree #' -#' +#' Function for making Decision Trees. #' @param data . -#' @param dep . -#' @param group . -#' @param alt . -#' @param varEq . +#' @param vars explanatory variables +#' @param target target variable #' @return A results object containing: #' \tabular{llllll}{ #' \code{results$todo} \tab \tab \tab \tab \tab a preformatted \cr #' \code{results$text1} \tab \tab \tab \tab \tab a preformatted \cr -#' \code{results$plot} \tab \tab \tab \tab \tab an image \cr +#' \code{results$plot2} \tab \tab \tab \tab \tab an image \cr #' } #' #' @export tree <- function( data, - dep, - group, - alt = "notequal", - varEq = TRUE) { + vars, + target) { if ( ! requireNamespace('jmvcore')) stop('tree requires jmvcore to be installed (restart may be required)') - if ( ! missing(dep)) dep <- jmvcore::resolveQuo(jmvcore::enquo(dep)) - if ( ! missing(group)) group <- jmvcore::resolveQuo(jmvcore::enquo(group)) + if ( ! missing(vars)) vars <- jmvcore::resolveQuo(jmvcore::enquo(vars)) + if ( ! missing(target)) target <- jmvcore::resolveQuo(jmvcore::enquo(target)) if (missing(data)) data <- jmvcore::marshalData( parent.frame(), - `if`( ! missing(dep), dep, NULL), - `if`( ! missing(group), group, NULL)) + `if`( ! missing(vars), vars, NULL), + `if`( ! missing(target), target, NULL)) options <- treeOptions$new( - dep = dep, - group = group, - alt = alt, - varEq = varEq) + vars = vars, + target = target) analysis <- treeClass$new( options = options, diff --git a/README.Rmd b/README.Rmd index dafb21612..04d8043fb 100644 --- a/README.Rmd +++ b/README.Rmd @@ -116,6 +116,7 @@ https://osf.io/9szud/ + #### GGStatsPlot πŸ”¬πŸ”¬πŸ”¬πŸ”¬ UNDER CONSTRUCTION πŸ› β›”οΈβš οΈπŸ”© diff --git a/README.html b/README.html new file mode 100644 index 000000000..aeed44311 --- /dev/null +++ b/README.html @@ -0,0 +1,755 @@ + + + + + + + + + + + + + + + + + + + + +

ClinicoPath

+
+

ClinicoPath jamovi Module πŸ”¬

+

A jamovi Module that contains main analysis used in ClinicoPathological research. ClinicoPath help researchers to generate natural language summaries of their dataset, generate cross tables with statistical tests, and survival analysis with survival tables, survival curves, and natural language summaries.

+

πŸ”¬πŸ‘€πŸ“‘πŸ—ƒπŸ“ŠπŸ¨πŸ—„πŸ“‡πŸ“–βš—πŸ“πŸŽΆπŸ“ˆπŸ“‰πŸ“ƒπŸ– πŸ”¬πŸ”¬πŸ‹πŸš΄πŸš™πŸ‘¨πŸ’» πŸ“ΈπŸ“ΊπŸŽ›πŸ”­πŸ”¬πŸ’ŠπŸ”πŸ«πŸŒΈ

+ + +
+

Download ClinicoPathJamoviModule

+

https://zenodo.org/account/settings/github/repository/sbalci/ClinicoPathJamoviModule

+

DOI 10.17605/OSF.IO/9SZUD

+

https://osf.io/9szud/

+
+

Installation in jamovi

+ + +

Installation via sideload jamovi

+ + + +

Screenshots of Module

+

Descriptives

+

TableOne

+ + +

Summary of Continuous Variables

+ + +

Summary of Categorical Variables

+ + +

Comparisons

+

Cross Table

+ + + + +

GGStatsPlot

+

πŸ”¬πŸ”¬πŸ”¬πŸ”¬ UNDER CONSTRUCTION πŸ› β›”οΈβš οΈπŸ”©

+ + + + +

Survival

+

Univariate Survival Analysis

+ + + + + + +

Multivariate Survival Analysis

+

πŸ”¬πŸ”¬πŸ”¬πŸ”¬ UNDER CONSTRUCTION πŸ› β›”οΈβš οΈπŸ”©

+ + + + +

Decision

+

Medical Decision

+

πŸ”¬πŸ”¬πŸ”¬πŸ”¬ UNDER CONSTRUCTION πŸ› β›”οΈβš οΈπŸ”©

+ + +

Decision Calculator

+

πŸ”¬πŸ”¬πŸ”¬πŸ”¬ UNDER CONSTRUCTION πŸ› β›”οΈβš οΈπŸ”©

+ + +

Correlation

+

Correlation

+

πŸ”¬πŸ”¬πŸ”¬πŸ”¬ UNDER CONSTRUCTION πŸ› β›”οΈβš οΈπŸ”©

+

Agreement

+

Interrater Intrarater Reliability

+

πŸ”¬πŸ”¬πŸ”¬πŸ”¬ UNDER CONSTRUCTION πŸ› β›”οΈβš οΈπŸ”©

+

Installation in R

+ + + + + + + + +

You can install the development version from GitHub with:

+
# install.packages("devtools")
+devtools::install_github("sbalci/ClinicoPathJamoviModule")
+

Acknowledgement

+

Made possible via the codes, help, and guidence of

+ +
+

+ + +

Buy me a coffeeBuy me a coffee

+

https://paypal.me/serdarbalci

+
+

Buy Me A Coffee
+Twitter Follow GitHub followers Say Thanks!

+

Development Status

+ + +

Launch Rstudio Binder Gitpod Ready-to-Code Download ClinicoPathJamoviModule Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public. lifecycle stability-experimental GitHub issues GitHub issues R-CMD-check Codacy Badge CodeFactor Coverage Status Build Status Build status codecov CircleCI GuardRails badge Maintainability Test Coverage DepShield Badge GitHub GitHub version GitHub last commit Last-changedate GitHub Release Date GitHub last commit GitHub commit activity Website GitHub code size in bytes minimal R version Libraries.io dependency status for GitHub repo Requirements Status DepShield Badge GitHub forks GitHub forks GitHub stars Github Stars GitHub stars Twitter Twitter URL contributions welcome GitHub watchers

+ + +

Code
+Launch Rstudio Binder Gitpod Ready-to-Code Download ClinicoPathJamoviModule

+

Status
+Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public. lifecycle stability-experimental GitHub issues GitHub issues

+

Check, CI
+R-CMD-check CodeFactor Codacy Badge Coverage Status Build Status Build status codecov CircleCI GuardRails badge Maintainability Test Coverage DepShield Badge

+

Recency, Updates
+GitHub GitHub version GitHub last commit Last-changedate GitHub Release Date GitHub last commit GitHub commit activity

+

Webpage, Links, Size, Download
+Website GitHub code size in bytes

+

Dependencies
+minimal R version Libraries.io dependency status for GitHub repo Requirements Status DepShield Badge

+

Interaction, Shares
+GitHub forks GitHub forks GitHub stars Github Stars GitHub stars Twitter Twitter URL contributions welcome GitHub watchers

+ + + diff --git a/README.md b/README.md index a99c86aac..d4bc2f233 100644 --- a/README.md +++ b/README.md @@ -238,7 +238,7 @@ Badge](https://depshield.sonatype.org/badges/sbalci/ClinicoPathJamoviModule/deps version](https://img.shields.io/badge/GitHub-0.0.1.1000-orange.svg?style=flat-square)](https://github.com/sbalci/clinicopathjamovimodule/) [![GitHub last commit](https://img.shields.io/github/last-commit/sbalci/clinicopathjamovimodule)](https://github.com/sbalci/clinicopathjamovimodule/commits/master) -[![Last-changedate](https://img.shields.io/badge/last%20change-2020--03--12-yellowgreen.svg)](https://github.com/sbalci/clinicopathjamovimodule/commits/master) +[![Last-changedate](https://img.shields.io/badge/last%20change-2020--03--29-yellowgreen.svg)](https://github.com/sbalci/clinicopathjamovimodule/commits/master) ![GitHub Release Date](https://img.shields.io/github/release-date/sbalci/clinicopathjamovimodule) ![GitHub last @@ -321,7 +321,7 @@ Badge](https://depshield.sonatype.org/badges/sbalci/ClinicoPathJamoviModule/deps version](https://img.shields.io/badge/GitHub-0.0.1.1000-orange.svg?style=flat-square)](https://github.com/sbalci/clinicopathjamovimodule/) [![GitHub last commit](https://img.shields.io/github/last-commit/sbalci/clinicopathjamovimodule)](https://github.com/sbalci/clinicopathjamovimodule/commits/master) -[![Last-changedate](https://img.shields.io/badge/last%20change-2020--03--12-yellowgreen.svg)](https://github.com/sbalci/clinicopathjamovimodule/commits/master) +[![Last-changedate](https://img.shields.io/badge/last%20change-2020--03--29-yellowgreen.svg)](https://github.com/sbalci/clinicopathjamovimodule/commits/master) ![GitHub Release Date](https://img.shields.io/github/release-date/sbalci/clinicopathjamovimodule) ![GitHub last diff --git a/codemeta.json b/codemeta.json index 14881b157..38b887739 100644 --- a/codemeta.json +++ b/codemeta.json @@ -5,13 +5,13 @@ ], "@type": "SoftwareSourceCode", "identifier": "ClinicoPath", - "description": "Analysis for Clinicopathological Research \n ClinicoPath help researchers to generate natural language summaries of their\n dataset, generate cross tables with statistical tests, and survival analysis\n with survival tables, survival plots, and natural language summaries.", + "description": "Analysis for Clinicopathological Research\n ClinicoPath help researchers to generate natural language summaries of\n their dataset, generate cross tables with statistical tests, and\n survival analysis with survival tables, survival plots, and natural\n language summaries.", "name": "ClinicoPath: Analysis for Clinicopathological Research", "codeRepository": "https://github.com/sbalci/ClinicoPathJamoviModule/", "relatedLink": "https://sbalci.github.io/ClinicoPathJamoviModule/", - "issueTracker": "https://github.com/sbalci/ClinicoPathJamoviModule/issues/", + "issueTracker": "\n https://github.com/sbalci/ClinicoPathJamoviModule/issues/", "license": "https://spdx.org/licenses/GPL-3.0", - "version": "0.0.1.2", + "version": "0.0.1.4", "programmingLanguage": { "@type": "ComputerLanguage", "name": "R", @@ -43,216 +43,221 @@ "softwareSuggestions": [ { "@type": "SoftwareApplication", - "identifier": "effectsize", - "name": "effectsize", + "identifier": "rmarkdown", + "name": "rmarkdown", "provider": { "@id": "https://cran.r-project.org", "@type": "Organization", "name": "Comprehensive R Archive Network (CRAN)", "url": "https://cran.r-project.org" }, - "sameAs": "https://CRAN.R-project.org/package=effectsize" + "sameAs": "https://CRAN.R-project.org/package=rmarkdown" }, { "@type": "SoftwareApplication", - "identifier": "emmeans", - "name": "emmeans", + "identifier": "tidyselect", + "name": "tidyselect", "provider": { "@id": "https://cran.r-project.org", "@type": "Organization", "name": "Comprehensive R Archive Network (CRAN)", "url": "https://cran.r-project.org" }, - "sameAs": "https://CRAN.R-project.org/package=emmeans" + "sameAs": "https://CRAN.R-project.org/package=tidyselect" }, { "@type": "SoftwareApplication", - "identifier": "rmarkdown", - "name": "rmarkdown", + "identifier": "kableExtra", + "name": "kableExtra", "provider": { "@id": "https://cran.r-project.org", "@type": "Organization", "name": "Comprehensive R Archive Network (CRAN)", "url": "https://cran.r-project.org" }, - "sameAs": "https://CRAN.R-project.org/package=rmarkdown" + "sameAs": "https://CRAN.R-project.org/package=kableExtra" }, { "@type": "SoftwareApplication", - "identifier": "igraph", - "name": "igraph", + "identifier": "yarrr", + "name": "yarrr", "provider": { "@id": "https://cran.r-project.org", "@type": "Organization", "name": "Comprehensive R Archive Network (CRAN)", "url": "https://cran.r-project.org" }, - "sameAs": "https://CRAN.R-project.org/package=igraph" + "sameAs": "https://CRAN.R-project.org/package=yarrr" }, { "@type": "SoftwareApplication", - "identifier": "iterators", - "name": "iterators", + "identifier": "circlize", + "name": "circlize", "provider": { "@id": "https://cran.r-project.org", "@type": "Organization", "name": "Comprehensive R Archive Network (CRAN)", "url": "https://cran.r-project.org" }, - "sameAs": "https://CRAN.R-project.org/package=iterators" + "sameAs": "https://CRAN.R-project.org/package=circlize" }, { "@type": "SoftwareApplication", - "identifier": "rms", - "name": "rms", + "identifier": "randomForest", + "name": "randomForest", "provider": { "@id": "https://cran.r-project.org", "@type": "Organization", "name": "Comprehensive R Archive Network (CRAN)", "url": "https://cran.r-project.org" }, - "sameAs": "https://CRAN.R-project.org/package=rms" + "sameAs": "https://CRAN.R-project.org/package=randomForest" + } + ], + "softwareRequirements": [ + { + "@type": "SoftwareApplication", + "identifier": "R", + "name": "R", + "version": ">= 3.6" }, { "@type": "SoftwareApplication", - "identifier": "commonmark", - "name": "commonmark", + "identifier": "caret", + "name": "caret", "provider": { "@id": "https://cran.r-project.org", "@type": "Organization", "name": "Comprehensive R Archive Network (CRAN)", "url": "https://cran.r-project.org" }, - "sameAs": "https://CRAN.R-project.org/package=commonmark" + "sameAs": "https://CRAN.R-project.org/package=caret" }, { "@type": "SoftwareApplication", - "identifier": "sass", - "name": "sass", + "identifier": "correlation", + "name": "correlation", "provider": { "@id": "https://cran.r-project.org", "@type": "Organization", "name": "Comprehensive R Archive Network (CRAN)", "url": "https://cran.r-project.org" }, - "sameAs": "https://CRAN.R-project.org/package=sass" - } - ], - "softwareRequirements": [ - { - "@type": "SoftwareApplication", - "identifier": "R", - "name": "R", - "version": ">= 3.6" + "sameAs": "https://github.com/easystats/correlation" }, { "@type": "SoftwareApplication", - "identifier": "jmvcore", - "name": "jmvcore", - "version": ">= 0.8.5", + "identifier": "dplyr", + "name": "dplyr", "provider": { "@id": "https://cran.r-project.org", "@type": "Organization", "name": "Comprehensive R Archive Network (CRAN)", "url": "https://cran.r-project.org" }, - "sameAs": "https://CRAN.R-project.org/package=jmvcore" + "sameAs": "https://CRAN.R-project.org/package=dplyr" }, { "@type": "SoftwareApplication", - "identifier": "R6", - "name": "R6", + "identifier": "explore", + "name": "explore", "provider": { "@id": "https://cran.r-project.org", "@type": "Organization", "name": "Comprehensive R Archive Network (CRAN)", "url": "https://cran.r-project.org" }, - "sameAs": "https://CRAN.R-project.org/package=R6" + "sameAs": "https://CRAN.R-project.org/package=explore" }, { "@type": "SoftwareApplication", - "identifier": "dplyr", - "name": "dplyr", + "identifier": "FFTrees", + "name": "FFTrees", + "sameAs": "https://github.com/ndphillips/FFTrees" + }, + { + "@type": "SoftwareApplication", + "identifier": "finalfit", + "name": "finalfit", "provider": { "@id": "https://cran.r-project.org", "@type": "Organization", "name": "Comprehensive R Archive Network (CRAN)", "url": "https://cran.r-project.org" }, - "sameAs": "https://CRAN.R-project.org/package=dplyr" + "sameAs": "https://CRAN.R-project.org/package=finalfit" }, { "@type": "SoftwareApplication", - "identifier": "survival", - "name": "survival", + "identifier": "forcats", + "name": "forcats", "provider": { "@id": "https://cran.r-project.org", "@type": "Organization", "name": "Comprehensive R Archive Network (CRAN)", "url": "https://cran.r-project.org" }, - "sameAs": "https://CRAN.R-project.org/package=survival" + "sameAs": "https://CRAN.R-project.org/package=forcats" }, { "@type": "SoftwareApplication", - "identifier": "survminer", - "name": "survminer", + "identifier": "ggalluvial", + "name": "ggalluvial", "provider": { "@id": "https://cran.r-project.org", "@type": "Organization", "name": "Comprehensive R Archive Network (CRAN)", "url": "https://cran.r-project.org" }, - "sameAs": "https://CRAN.R-project.org/package=survminer" + "sameAs": "https://CRAN.R-project.org/package=ggalluvial" }, { "@type": "SoftwareApplication", - "identifier": "finalfit", - "name": "finalfit", + "identifier": "ggplot2", + "name": "ggplot2", "provider": { "@id": "https://cran.r-project.org", "@type": "Organization", "name": "Comprehensive R Archive Network (CRAN)", "url": "https://cran.r-project.org" }, - "sameAs": "https://CRAN.R-project.org/package=finalfit" + "sameAs": "https://CRAN.R-project.org/package=ggplot2" }, { "@type": "SoftwareApplication", - "identifier": "arsenal", - "name": "arsenal", + "identifier": "ggstatsplot", + "name": "ggstatsplot", "provider": { "@id": "https://cran.r-project.org", "@type": "Organization", "name": "Comprehensive R Archive Network (CRAN)", "url": "https://cran.r-project.org" }, - "sameAs": "https://CRAN.R-project.org/package=arsenal" + "sameAs": "https://CRAN.R-project.org/package=ggstatsplot" }, { "@type": "SoftwareApplication", - "identifier": "purrr", - "name": "purrr", + "identifier": "glue", + "name": "glue", "provider": { "@id": "https://cran.r-project.org", "@type": "Organization", "name": "Comprehensive R Archive Network (CRAN)", "url": "https://cran.r-project.org" }, - "sameAs": "https://CRAN.R-project.org/package=purrr" + "sameAs": "https://CRAN.R-project.org/package=glue" }, { "@type": "SoftwareApplication", - "identifier": "glue", - "name": "glue", + "identifier": "irr", + "name": "irr", "provider": { "@id": "https://cran.r-project.org", "@type": "Organization", "name": "Comprehensive R Archive Network (CRAN)", "url": "https://cran.r-project.org" }, - "sameAs": "https://CRAN.R-project.org/package=glue" + "sameAs": "https://CRAN.R-project.org/package=irr" }, { "@type": "SoftwareApplication", @@ -268,51 +273,82 @@ }, { "@type": "SoftwareApplication", - "identifier": "ggplot2", - "name": "ggplot2", + "identifier": "jmvcore", + "name": "jmvcore", + "version": ">= 0.8.5", "provider": { "@id": "https://cran.r-project.org", "@type": "Organization", "name": "Comprehensive R Archive Network (CRAN)", "url": "https://cran.r-project.org" }, - "sameAs": "https://CRAN.R-project.org/package=ggplot2" + "sameAs": "https://CRAN.R-project.org/package=jmvcore" }, { "@type": "SoftwareApplication", - "identifier": "forcats", - "name": "forcats", + "identifier": "jsonlite", + "name": "jsonlite", "provider": { "@id": "https://cran.r-project.org", "@type": "Organization", "name": "Comprehensive R Archive Network (CRAN)", "url": "https://cran.r-project.org" }, - "sameAs": "https://CRAN.R-project.org/package=forcats" + "sameAs": "https://CRAN.R-project.org/package=jsonlite" }, { "@type": "SoftwareApplication", - "identifier": "tableone", - "name": "tableone", + "identifier": "knitr", + "name": "knitr", "provider": { "@id": "https://cran.r-project.org", "@type": "Organization", "name": "Comprehensive R Archive Network (CRAN)", "url": "https://cran.r-project.org" }, - "sameAs": "https://CRAN.R-project.org/package=tableone" + "sameAs": "https://CRAN.R-project.org/package=knitr" }, { "@type": "SoftwareApplication", - "identifier": "tangram", - "name": "tangram", + "identifier": "networkD3", + "name": "networkD3", "provider": { "@id": "https://cran.r-project.org", "@type": "Organization", "name": "Comprehensive R Archive Network (CRAN)", "url": "https://cran.r-project.org" }, - "sameAs": "https://CRAN.R-project.org/package=tangram" + "sameAs": "https://CRAN.R-project.org/package=networkD3" + }, + { + "@type": "SoftwareApplication", + "identifier": "purrr", + "name": "purrr", + "provider": { + "@id": "https://cran.r-project.org", + "@type": "Organization", + "name": "Comprehensive R Archive Network (CRAN)", + "url": "https://cran.r-project.org" + }, + "sameAs": "https://CRAN.R-project.org/package=purrr" + }, + { + "@type": "SoftwareApplication", + "identifier": "R6", + "name": "R6", + "provider": { + "@id": "https://cran.r-project.org", + "@type": "Organization", + "name": "Comprehensive R Archive Network (CRAN)", + "url": "https://cran.r-project.org" + }, + "sameAs": "https://CRAN.R-project.org/package=R6" + }, + { + "@type": "SoftwareApplication", + "identifier": "report", + "name": "report", + "sameAs": "https://github.com/easystats/report" }, { "@type": "SoftwareApplication", @@ -328,87 +364,92 @@ }, { "@type": "SoftwareApplication", - "identifier": "knitr", - "name": "knitr", + "identifier": "scales", + "name": "scales", "provider": { "@id": "https://cran.r-project.org", "@type": "Organization", "name": "Comprehensive R Archive Network (CRAN)", "url": "https://cran.r-project.org" }, - "sameAs": "https://CRAN.R-project.org/package=knitr" + "sameAs": "https://CRAN.R-project.org/package=scales" }, { "@type": "SoftwareApplication", - "identifier": "remotes", - "name": "remotes", + "identifier": "survival", + "name": "survival", "provider": { "@id": "https://cran.r-project.org", "@type": "Organization", "name": "Comprehensive R Archive Network (CRAN)", "url": "https://cran.r-project.org" }, - "sameAs": "https://CRAN.R-project.org/package=remotes" + "sameAs": "https://CRAN.R-project.org/package=survival" }, { "@type": "SoftwareApplication", - "identifier": "kableExtra", - "name": "kableExtra", + "identifier": "survminer", + "name": "survminer", "provider": { "@id": "https://cran.r-project.org", "@type": "Organization", "name": "Comprehensive R Archive Network (CRAN)", "url": "https://cran.r-project.org" }, - "sameAs": "https://CRAN.R-project.org/package=kableExtra" + "sameAs": "https://CRAN.R-project.org/package=survminer" }, { "@type": "SoftwareApplication", - "identifier": "ggstatsplot", - "name": "ggstatsplot", + "identifier": "tableone", + "name": "tableone", "provider": { "@id": "https://cran.r-project.org", "@type": "Organization", "name": "Comprehensive R Archive Network (CRAN)", "url": "https://cran.r-project.org" }, - "sameAs": "https://CRAN.R-project.org/package=ggstatsplot" + "sameAs": "https://CRAN.R-project.org/package=tableone" }, { "@type": "SoftwareApplication", - "identifier": "ggalluvial", - "name": "ggalluvial", + "identifier": "tangram", + "name": "tangram", "provider": { "@id": "https://cran.r-project.org", "@type": "Organization", "name": "Comprehensive R Archive Network (CRAN)", "url": "https://cran.r-project.org" }, - "sameAs": "https://CRAN.R-project.org/package=ggalluvial" + "sameAs": "https://CRAN.R-project.org/package=tangram" }, { "@type": "SoftwareApplication", - "identifier": "caret", - "name": "caret", + "identifier": "tibble", + "name": "tibble", "provider": { "@id": "https://cran.r-project.org", "@type": "Organization", "name": "Comprehensive R Archive Network (CRAN)", "url": "https://cran.r-project.org" }, - "sameAs": "https://CRAN.R-project.org/package=caret" + "sameAs": "https://CRAN.R-project.org/package=tibble" }, { "@type": "SoftwareApplication", - "identifier": "irr", - "name": "irr", + "identifier": "tidyr", + "name": "tidyr", "provider": { "@id": "https://cran.r-project.org", "@type": "Organization", "name": "Comprehensive R Archive Network (CRAN)", "url": "https://cran.r-project.org" }, - "sameAs": "https://CRAN.R-project.org/package=irr" + "sameAs": "https://CRAN.R-project.org/package=tidyr" + }, + { + "@type": "SoftwareApplication", + "identifier": "utils", + "name": "utils" } ], "releaseNotes": "https://github.com/sbalci/ClinicoPathJamoviModule/blob/master/NEWS.md", @@ -436,7 +477,9 @@ "correlation", "decision", "summary", - "statistics" + "statistics", + "survival-analysis", + "natural-language-summaries" ], - "fileSize": "13456.767KB" + "fileSize": "27081.113KB" } diff --git a/docs/404.html b/docs/404.html index 34a221091..9d8e8a132 100644 --- a/docs/404.html +++ b/docs/404.html @@ -67,7 +67,7 @@ ClinicoPath - 0.0.1.2 + 0.0.1.4 diff --git a/docs/LICENSE.html b/docs/LICENSE.html index e0cf208d9..536e270ab 100644 --- a/docs/LICENSE.html +++ b/docs/LICENSE.html @@ -67,7 +67,7 @@ ClinicoPath - 0.0.1.2 + 0.0.1.4 diff --git a/docs/articles/data-preperation.html b/docs/articles/data-preperation.html index 9aa81ceda..095d3dcbb 100644 --- a/docs/articles/data-preperation.html +++ b/docs/articles/data-preperation.html @@ -31,7 +31,7 @@ ClinicoPath - 0.0.1.2 + 0.0.1.4 diff --git a/docs/articles/index.html b/docs/articles/index.html index 842f5fb5a..8507416ca 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -67,7 +67,7 @@ ClinicoPath - 0.0.1.2 + 0.0.1.4 diff --git a/docs/articles/module_development_jamovi.html b/docs/articles/module_development_jamovi.html index bded56c78..0bd86c7d2 100644 --- a/docs/articles/module_development_jamovi.html +++ b/docs/articles/module_development_jamovi.html @@ -31,7 +31,7 @@ ClinicoPath - 0.0.1.2 + 0.0.1.4 @@ -230,9 +230,46 @@

https://github.com/jamovi/jmv/blob/master/jamovi/ancova.r.yaml#L174

+
+

+build folder

+
+

+js folder

+
+

+event.js

+
+
+
+

+R3.6.1-macos

+
+
+
+

+Installing

+
+
+

+jmvtools::install +

+
+
+

+devtools::install +

+
devtools::install(upgrade = FALSE, quick = TRUE)
+

General

+
+

+YAML

+ +

RStudio options

@@ -388,8 +425,18 @@

  • +build folder +
  • +
  • Installing
  • +
  • jmvtools::install
  • +
  • devtools::install
  • +
  • General
  • diff --git a/docs/authors.html b/docs/authors.html index 455a1684b..dfb8cbf36 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -67,7 +67,7 @@ ClinicoPath - 0.0.1.2 + 0.0.1.4
    diff --git a/docs/index.html b/docs/index.html index e9c18908c..347dd4a1c 100644 --- a/docs/index.html +++ b/docs/index.html @@ -11,10 +11,11 @@ - + -

    Launch Rstudio Binder Gitpod Ready-to-Code Download ClinicoPathJamoviModule Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public. lifecycle stability-experimental GitHub issues GitHub issuesR-CMD-checkCodacy Badge CodeFactor Coverage Status Build Status Build status codecov CircleCI GuardRails badge Maintainability Test Coverage DepShield Badge GitHubGitHub version GitHub last commit Last-changedate GitHub Release DateGitHub last commitGitHub commit activityWebsite GitHub code size in bytes minimal R version Libraries.io dependency status for GitHub repo Requirements Status DepShield Badge GitHub forks GitHub forksGitHub stars Github Stars GitHub starsTwitter Twitter URLcontributions welcome GitHub watchers

    +

    Launch Rstudio Binder Gitpod Ready-to-Code Download ClinicoPathJamoviModule Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public. lifecycle stability-experimental GitHub issues GitHub issuesR-CMD-checkCodacy Badge CodeFactor Coverage Status Build Status Build status codecov CircleCI GuardRails badge Maintainability Test Coverage DepShield Badge GitHubGitHub version GitHub last commit Last-changedate GitHub Release DateGitHub last commitGitHub commit activityWebsite GitHub code size in bytes minimal R version Libraries.io dependency status for GitHub repo Requirements Status DepShield Badge GitHub forks GitHub forksGitHub stars Github Stars GitHub starsTwitter Twitter URLcontributions welcome GitHub watchers

    Code
    Launch Rstudio Binder Gitpod Ready-to-Code Download ClinicoPathJamoviModule

    Status
    Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public. lifecycle stability-experimental GitHub issues GitHub issues

    Check, CI
    R-CMD-checkCodeFactor Codacy Badge Coverage Status Build Status Build status codecov CircleCI GuardRails badge Maintainability Test Coverage DepShield Badge

    -

    Recency, Updates
    GitHubGitHub version GitHub last commit Last-changedate GitHub Release DateGitHub last commitGitHub commit activity

    +

    Recency, Updates
    GitHubGitHub version GitHub last commit Last-changedate GitHub Release DateGitHub last commitGitHub commit activity

    Webpage, Links, Size, Download
    Website GitHub code size in bytes

    Dependencies
    minimal R version Libraries.io dependency status for GitHub repo Requirements Status DepShield Badge

    Interaction, Shares
    GitHub forks GitHub forksGitHub stars Github Stars GitHub starsTwitter Twitter URLcontributions welcome GitHub watchers

    @@ -307,7 +308,8 @@

    Links

    diff --git a/docs/news/index.html b/docs/news/index.html index 237229b20..6288c5334 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -67,7 +67,7 @@ ClinicoPath - 0.0.1.2 + 0.0.1.4 diff --git a/docs/reference/agreement.html b/docs/reference/agreement.html index 49e70d218..08cb1ab10 100644 --- a/docs/reference/agreement.html +++ b/docs/reference/agreement.html @@ -69,7 +69,7 @@ ClinicoPath - 0.0.1.2 + 0.0.1.4 @@ -168,6 +168,7 @@

    Value

    A results object containing:

    +
    results$todoa preformatted
    results$texta preformatted
    results$text1a preformatted
    results$text2a preformatted
    diff --git a/docs/reference/competingsurvival.html b/docs/reference/competingsurvival.html new file mode 100644 index 000000000..b4b2b48c1 --- /dev/null +++ b/docs/reference/competingsurvival.html @@ -0,0 +1,215 @@ + + + + + + + + +Competing Survival β€” competingsurvival β€’ ClinicoPath + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + +
    + +
    +
    + + +
    +

    Competing Survival

    +
    + +
    competingsurvival(data, dep, group, alt = "notequal", varEq = TRUE)
    + +

    Arguments

    + + + + + + + + + + + + + + + + + + + + + + +
    data

    .

    dep

    .

    group

    .

    alt

    .

    varEq

    .

    + +

    Value

    + +

    A results object containing:

    + +
    results$texta preformatted
    + + + +
    + +
    + + + +
    + + + + + + + + diff --git a/docs/reference/correlation.html b/docs/reference/correlation.html index 44127b5ab..cd3d26f28 100644 --- a/docs/reference/correlation.html +++ b/docs/reference/correlation.html @@ -69,7 +69,7 @@ ClinicoPath - 0.0.1.2 + 0.0.1.4 diff --git a/docs/reference/crosstable.html b/docs/reference/crosstable.html index e4c37607b..eeaac7789 100644 --- a/docs/reference/crosstable.html +++ b/docs/reference/crosstable.html @@ -69,7 +69,7 @@ ClinicoPath - 0.0.1.2 + 0.0.1.4 diff --git a/docs/reference/decision.html b/docs/reference/decision.html index e5782002b..45e3f5098 100644 --- a/docs/reference/decision.html +++ b/docs/reference/decision.html @@ -69,7 +69,7 @@ ClinicoPath - 0.0.1.2 + 0.0.1.4 diff --git a/docs/reference/decisioncalculator.html b/docs/reference/decisioncalculator.html index ee605df26..ff13ff461 100644 --- a/docs/reference/decisioncalculator.html +++ b/docs/reference/decisioncalculator.html @@ -69,7 +69,7 @@ ClinicoPath - 0.0.1.2 + 0.0.1.4 diff --git a/docs/reference/index.html b/docs/reference/index.html index ff6eb96cc..4d5c8734c 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -67,7 +67,7 @@ ClinicoPath - 0.0.1.2 + 0.0.1.4 @@ -162,6 +162,12 @@

    competingsurvival()

    + +

    Competing Survival

    + +

    correlation()

    @@ -204,6 +210,12 @@

    statsplotbetween()

    + +

    Stats Plot Between

    + +

    summarydata()

    diff --git a/docs/reference/multisurvival.html b/docs/reference/multisurvival.html index 37969c479..2c87c3694 100644 --- a/docs/reference/multisurvival.html +++ b/docs/reference/multisurvival.html @@ -69,7 +69,7 @@ ClinicoPath - 0.0.1.2 + 0.0.1.4 diff --git a/docs/reference/reportcat.html b/docs/reference/reportcat.html index be9ca2f07..f43e342aa 100644 --- a/docs/reference/reportcat.html +++ b/docs/reference/reportcat.html @@ -69,7 +69,7 @@ ClinicoPath - 0.0.1.2 + 0.0.1.4 diff --git a/docs/reference/statsplot2.html b/docs/reference/statsplot2.html index 38f660156..c5343d221 100644 --- a/docs/reference/statsplot2.html +++ b/docs/reference/statsplot2.html @@ -69,7 +69,7 @@ ClinicoPath - 0.0.1.2 + 0.0.1.4 @@ -147,7 +147,7 @@

    Graphs and Plots

    Graphs and Plots

    -
    statsplot2(data, dep, group, direction = "independent")
    +
    statsplot2(data, dep, group, direction = "independent", distribution = "p")

    Arguments

    @@ -168,6 +168,10 @@

    Arg

    + + + +
    direction

    select measurement type (repeated or independent)

    distribution

    select distribution type (parametric or nonparametric)

    Value

    diff --git a/docs/reference/statsplotbetween.html b/docs/reference/statsplotbetween.html new file mode 100644 index 000000000..38dac9a93 --- /dev/null +++ b/docs/reference/statsplotbetween.html @@ -0,0 +1,211 @@ + + + + + + + + +Stats Plot Between β€” statsplotbetween β€’ ClinicoPath + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + +
    + +
    +
    + + +
    +

    Stats Plot Between

    +
    + +
    statsplotbetween(data, dep, group)
    + +

    Arguments

    + + + + + + + + + + + + + + +
    data

    .

    dep

    .

    group

    .

    + +

    Value

    + +

    A results object containing:

    + + + + + +
    results$texta preformatted
    results$text1a preformatted
    results$text2a preformatted
    results$plothtmla html
    results$plotan image
    + + + +
    + +
    + + + +
    + + + + + + + + diff --git a/docs/reference/summarydata.html b/docs/reference/summarydata.html index 46dc1885c..08c4fb2f3 100644 --- a/docs/reference/summarydata.html +++ b/docs/reference/summarydata.html @@ -69,7 +69,7 @@ ClinicoPath - 0.0.1.2 + 0.0.1.4 diff --git a/docs/reference/survival.html b/docs/reference/survival.html index 3ad7f68ea..1a29a4137 100644 --- a/docs/reference/survival.html +++ b/docs/reference/survival.html @@ -69,7 +69,7 @@ ClinicoPath - 0.0.1.2 + 0.0.1.4 diff --git a/docs/reference/tableone.html b/docs/reference/tableone.html index c28105908..56eac89f7 100644 --- a/docs/reference/tableone.html +++ b/docs/reference/tableone.html @@ -69,7 +69,7 @@ ClinicoPath - 0.0.1.2 + 0.0.1.4 diff --git a/docs/reference/tree.html b/docs/reference/tree.html index 7dd7e8102..a9231acfd 100644 --- a/docs/reference/tree.html +++ b/docs/reference/tree.html @@ -36,7 +36,7 @@ - + @@ -69,7 +69,7 @@ ClinicoPath - 0.0.1.2 + 0.0.1.4 @@ -144,10 +144,10 @@

    Decision Tree

    -

    Decision Tree

    +

    Function for making Decision Trees.

    -
    tree(data, dep, group, alt = "notequal", varEq = TRUE)
    +
    tree(data, vars, target)

    Arguments

    @@ -157,20 +157,12 @@

    Arg

    - - - - - - + + - - - - - - + +

    .

    dep

    .

    group

    .

    vars

    explanatory variables

    alt

    .

    varEq

    .

    target

    target variable

    @@ -179,7 +171,7 @@

    Value

    A results object containing:

    - +
    results$todoa preformatted
    results$text1a preformatted
    results$plotan image
    results$plot2an image
    diff --git a/docs/sitemap.xml b/docs/sitemap.xml index db87331b0..95c1e8590 100644 --- a/docs/sitemap.xml +++ b/docs/sitemap.xml @@ -6,6 +6,9 @@ https://sbalci.github.io/ClinicoPathJamoviModule//reference/agreement.html + + https://sbalci.github.io/ClinicoPathJamoviModule//reference/competingsurvival.html + https://sbalci.github.io/ClinicoPathJamoviModule//reference/correlation.html @@ -27,6 +30,9 @@ https://sbalci.github.io/ClinicoPathJamoviModule//reference/statsplot2.html + + https://sbalci.github.io/ClinicoPathJamoviModule//reference/statsplotbetween.html + https://sbalci.github.io/ClinicoPathJamoviModule//reference/summarydata.html diff --git a/jamovi/0000.yaml b/jamovi/0000.yaml index 1a3ab991b..83c5f7fa1 100644 --- a/jamovi/0000.yaml +++ b/jamovi/0000.yaml @@ -1,12 +1,12 @@ --- title: Common Analysis for Clinicopathological Research name: ClinicoPath -version: 0.0.1.0002 +version: 0.0.1.0004 jms: '1.0' authors: - Serdar Balci maintainer: Serdar Balci -date: '2020-03-17' +date: '2020-03-29' type: R description: >- ClinicoPath help researchers to generate natural language summaries of their @@ -88,6 +88,19 @@ analyses: menuGroup: ClinicoPath2 menuSubgroup: Decision Tree menuTitle: Decision Tree + description: Function for making Decision Trees. + - title: Competing Survival + name: competingsurvival + ns: ClinicoPath + menuGroup: ClinicoPath2 + menuSubgroup: Survival2 + menuTitle: Competing Survival + - title: Stats Plot Between + name: statsplotbetween + ns: ClinicoPath + menuGroup: ClinicoPath2 + menuSubgroup: Comparisons2 + menuTitle: Stats Plot Between datasets: - name: histopathology including analysis path: histopathologyanalysis.omv @@ -108,9 +121,7 @@ datasets: - Survival - name: melanoma path: melanoma.csv - description: >- - melanoma dataset obtained from {boot}. - https://stat.ethz.ch/R-manual/R-devel/library/boot/html/melanoma.html + description: 'melanoma dataset obtained from {boot}.' tags: - Data Summary - Survival diff --git a/jamovi/00refs.yaml b/jamovi/00refs.yaml index 0a3902221..82fd09d4a 100644 --- a/jamovi/00refs.yaml +++ b/jamovi/00refs.yaml @@ -260,4 +260,20 @@ refs: title: "ggalluvial: Alluvial Plots in 'ggplot2'." publisher: '[R package]. Retrieved from https://CRAN.R-project.org/package=ggalluvial' url: https://CRAN.R-project.org/package=ggalluvial + + explore: + type: 'software' + author: Roland Krasser + year: 2020 + title: "explore: Simplifies Exploratory Data Analysis." + publisher: '[R package]. Retrieved from https://CRAN.R-project.org/package=explore' + url: https://CRAN.R-project.org/package=explore + + FFTrees: + type: 'software' + author: Nathaniel Phillips, Hansjoerg Neth, Jan Woike and Wolfgang Gaissmaer + year: 2019 + title: "FFTrees: Generate, Visualise, and Evaluate Fast-and-Frugal Decision Trees" + publisher: '[R package]. Retrieved from https://CRAN.R-project.org/package=FFTrees' + url: https://CRAN.R-project.org/package=FFTrees ... diff --git a/jamovi/agreement.r.yaml b/jamovi/agreement.r.yaml index 7b37b70a8..22ae0ae6f 100644 --- a/jamovi/agreement.r.yaml +++ b/jamovi/agreement.r.yaml @@ -9,6 +9,10 @@ items: title: To Do type: Preformatted + - name: text + title: 'Table' + type: Preformatted + - name: text1 title: Interrater Intrarater Reliability type: Preformatted diff --git a/jamovi/competingsurvival.a.yaml b/jamovi/competingsurvival.a.yaml new file mode 100644 index 000000000..ca8a516ce --- /dev/null +++ b/jamovi/competingsurvival.a.yaml @@ -0,0 +1,37 @@ +--- +name: competingsurvival +title: Competing Survival +menuGroup: ClinicoPath2 +menuSubgroup: Survival2 +version: '1.0.0' +jas: '1.2' + +options: + - name: data + type: Data + + - name: dep + title: Dependent Variable + type: Variable + + - name: group + title: Grouping Variable + type: Variable + + - name: alt + title: Alternative hypothesis + type: List + options: + - title: Not equal + name: notequal + - title: One greater + name: onegreater + - title: Two greater + name: twogreater + default: notequal + + - name: varEq + title: Assume equal variances + type: Bool + default: true +... diff --git a/jamovi/competingsurvival.r.yaml b/jamovi/competingsurvival.r.yaml new file mode 100644 index 000000000..5c3e7bbf2 --- /dev/null +++ b/jamovi/competingsurvival.r.yaml @@ -0,0 +1,11 @@ +--- +name: competingsurvival +title: Competing Survival +jrs: '1.1' + +items: + - name: text + title: Competing Survival + type: Preformatted + +... diff --git a/jamovi/competingsurvival.u.yaml b/jamovi/competingsurvival.u.yaml new file mode 100644 index 000000000..9ec300a31 --- /dev/null +++ b/jamovi/competingsurvival.u.yaml @@ -0,0 +1,34 @@ +title: Competing Survival +name: competingsurvival +jus: '3.0' +stage: 0 +compilerMode: aggressive +children: + - type: VariableSupplier + persistentItems: false + stretchFactor: 1 + children: + - type: TargetLayoutBox + label: Dependent Variable + children: + - type: VariablesListBox + name: dep + maxItemCount: 1 + isTarget: true + - type: TargetLayoutBox + label: Grouping Variable + children: + - type: VariablesListBox + name: group + maxItemCount: 1 + isTarget: true + - type: LayoutBox + margin: large + children: + - type: ComboBox + name: alt + - type: LayoutBox + margin: large + children: + - type: CheckBox + name: varEq diff --git a/jamovi/multisurvival.a.yaml b/jamovi/multisurvival.a.yaml index 539794349..01d01de4b 100644 --- a/jamovi/multisurvival.a.yaml +++ b/jamovi/multisurvival.a.yaml @@ -20,15 +20,18 @@ options: suggested: [ continuous ] permitted: [ numeric ] + # - name: outcomeLevel # title: | # Select Event (Death, Recurrence) # type: Level # variable: (outcome) + - name: overalltime title: 'Overall Time (in months)' type: Variable suggested: [ continuous ] permitted: [ numeric ] + ... diff --git a/jamovi/multisurvival.u.yaml b/jamovi/multisurvival.u.yaml index 306069abd..6ef65cb4a 100644 --- a/jamovi/multisurvival.u.yaml +++ b/jamovi/multisurvival.u.yaml @@ -22,7 +22,7 @@ children: maxItemCount: 1 isTarget: true - type: TargetLayoutBox - label: OverallTime + label: 'Overall Time (in months)' children: - type: VariablesListBox name: overalltime diff --git a/jamovi/statsplot2.a.yaml b/jamovi/statsplot2.a.yaml index 60fe9978f..1cb353410 100644 --- a/jamovi/statsplot2.a.yaml +++ b/jamovi/statsplot2.a.yaml @@ -28,9 +28,23 @@ options: name: independent default: independent description: + ui: options for measurement type R: select measurement type (repeated or independent) + - name: distribution + title: Distribution of Data + type: List + options: + - title: Parametric (normal distribution) + name: p + - title: Nonparametric + name: np + default: p + description: + R: select distribution type (parametric or nonparametric) + + # - name: typex # title: Type of grouping variable # type: List diff --git a/jamovi/statsplot2.r.yaml b/jamovi/statsplot2.r.yaml index ec3e6dac3..c0d081d41 100644 --- a/jamovi/statsplot2.r.yaml +++ b/jamovi/statsplot2.r.yaml @@ -36,8 +36,7 @@ items: - dep - group - direction - - typex - - typey + - distribution diff --git a/jamovi/statsplot2.u.yaml b/jamovi/statsplot2.u.yaml index 1366e9d12..6ce42a440 100644 --- a/jamovi/statsplot2.u.yaml +++ b/jamovi/statsplot2.u.yaml @@ -2,7 +2,7 @@ title: Graphs and Plots name: statsplot2 jus: '3.0' stage: 0 -compilerMode: aggressive +compilerMode: tame children: - type: VariableSupplier persistentItems: false @@ -22,6 +22,11 @@ children: name: group maxItemCount: 1 isTarget: true + - type: LayoutBox + margin: large + children: + - type: ComboBox + name: distribution - type: LayoutBox margin: large children: diff --git a/jamovi/statsplotbetween.a.yaml b/jamovi/statsplotbetween.a.yaml new file mode 100644 index 000000000..6ffedb8b2 --- /dev/null +++ b/jamovi/statsplotbetween.a.yaml @@ -0,0 +1,20 @@ +--- +name: statsplotbetween +title: Stats Plot Between +menuGroup: ClinicoPath2 +menuSubgroup: Comparisons2 +version: '1.0.0' +jas: '1.2' + +options: + - name: data + type: Data + + - name: dep + title: Dependent Variable + type: Variable + + - name: group + title: Grouping Variable + type: Variable +... diff --git a/jamovi/statsplotbetween.r.yaml b/jamovi/statsplotbetween.r.yaml new file mode 100644 index 000000000..b05bb88ee --- /dev/null +++ b/jamovi/statsplotbetween.r.yaml @@ -0,0 +1,42 @@ +--- +name: statsplotbetween +title: Stats Plot Between +jrs: '1.1' + +items: + - name: text + title: Stats Plot Between + type: Preformatted + + + - name: text1 + title: Text1 + type: Preformatted + + + - name: text2 + title: Text2 + type: Preformatted + + + - name: plothtml + title: plothtml + type: Html + + + + - title: D3 + name: plot + type: Image + width: 600 + height: 450 + renderFun: .plot + requiresData: true + clearWith: + - dep + - group + + + + +... diff --git a/jamovi/statsplotbetween.u.yaml b/jamovi/statsplotbetween.u.yaml new file mode 100644 index 000000000..06e10e506 --- /dev/null +++ b/jamovi/statsplotbetween.u.yaml @@ -0,0 +1,24 @@ +title: Stats Plot Between +name: statsplotbetween +jus: '3.0' +stage: 0 +compilerMode: aggressive +children: + - type: VariableSupplier + persistentItems: false + stretchFactor: 1 + children: + - type: TargetLayoutBox + label: Dependent Variable + children: + - type: VariablesListBox + name: dep + maxItemCount: 1 + isTarget: true + - type: TargetLayoutBox + label: Grouping Variable + children: + - type: VariablesListBox + name: group + maxItemCount: 1 + isTarget: true diff --git a/jamovi/tree.a.yaml b/jamovi/tree.a.yaml index a3386bdd2..1700099e7 100644 --- a/jamovi/tree.a.yaml +++ b/jamovi/tree.a.yaml @@ -6,32 +6,22 @@ menuSubgroup: Decision Tree version: '1.0.0' jas: '1.2' +description: + main: Function for making Decision Trees. + options: - name: data type: Data - - name: dep - title: Dependent Variable - type: Variable + - name: vars + title: Explanatory Variables + type: Variables + description: > + explanatory variables - - name: group - title: Grouping Variable + - name: target + title: Target Variable type: Variable - - - name: alt - title: Alternative hypothesis - type: List - options: - - title: Not equal - name: notequal - - title: One greater - name: onegreater - - title: Two greater - name: twogreater - default: notequal - - - name: varEq - title: Assume equal variances - type: Bool - default: true + description: > + target variable ... diff --git a/jamovi/tree.r.yaml b/jamovi/tree.r.yaml index 7dc0f1600..ec1c78482 100644 --- a/jamovi/tree.r.yaml +++ b/jamovi/tree.r.yaml @@ -13,12 +13,30 @@ items: title: Decision Tree type: Preformatted - - name: plot + # - name: plot + # title: Decision Tree + # type: Image + # width: 600 + # height: 450 + # renderFun: .plot + # requiresData: true + # clearWith: + # - vars + # - target + + + - name: plot2 + title: FFTrees type: Image width: 600 height: 450 - renderFun: .plot - -refs: explore + renderFun: .plot2 + requiresData: true + clearWith: + - vars + - target +refs: + - explore + - FFTrees ... diff --git a/jamovi/tree.u.yaml b/jamovi/tree.u.yaml index 4c7a6140d..0b4bb90b3 100644 --- a/jamovi/tree.u.yaml +++ b/jamovi/tree.u.yaml @@ -9,26 +9,15 @@ children: stretchFactor: 1 children: - type: TargetLayoutBox - label: Dependent Variable + label: Explanatory Variables children: - type: VariablesListBox - name: dep - maxItemCount: 1 + name: vars isTarget: true - type: TargetLayoutBox - label: Grouping Variable + label: Target Variable children: - type: VariablesListBox - name: group + name: target maxItemCount: 1 isTarget: true - - type: LayoutBox - margin: large - children: - - type: ComboBox - name: alt - - type: LayoutBox - margin: large - children: - - type: CheckBox - name: varEq diff --git a/man/agreement.Rd b/man/agreement.Rd index 3913615cd..61ca99140 100644 --- a/man/agreement.Rd +++ b/man/agreement.Rd @@ -17,6 +17,7 @@ numeric} A results object containing: \tabular{llllll}{ \code{results$todo} \tab \tab \tab \tab \tab a preformatted \cr +\code{results$text} \tab \tab \tab \tab \tab a preformatted \cr \code{results$text1} \tab \tab \tab \tab \tab a preformatted \cr \code{results$text2} \tab \tab \tab \tab \tab a preformatted \cr } diff --git a/man/competingsurvival.Rd b/man/competingsurvival.Rd new file mode 100644 index 000000000..897f250e5 --- /dev/null +++ b/man/competingsurvival.Rd @@ -0,0 +1,28 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/competingsurvival.h.R +\name{competingsurvival} +\alias{competingsurvival} +\title{Competing Survival} +\usage{ +competingsurvival(data, dep, group, alt = "notequal", varEq = TRUE) +} +\arguments{ +\item{data}{.} + +\item{dep}{.} + +\item{group}{.} + +\item{alt}{.} + +\item{varEq}{.} +} +\value{ +A results object containing: +\tabular{llllll}{ +\code{results$text} \tab \tab \tab \tab \tab a preformatted \cr +} +} +\description{ +Competing Survival +} diff --git a/man/statsplot2.Rd b/man/statsplot2.Rd index cb15a91c0..92111b095 100644 --- a/man/statsplot2.Rd +++ b/man/statsplot2.Rd @@ -4,7 +4,7 @@ \alias{statsplot2} \title{Graphs and Plots} \usage{ -statsplot2(data, dep, group, direction = "independent") +statsplot2(data, dep, group, direction = "independent", distribution = "p") } \arguments{ \item{data}{.} @@ -14,6 +14,8 @@ statsplot2(data, dep, group, direction = "independent") \item{group}{.} \item{direction}{select measurement type (repeated or independent)} + +\item{distribution}{select distribution type (parametric or nonparametric)} } \value{ A results object containing: diff --git a/man/statsplotbetween.Rd b/man/statsplotbetween.Rd new file mode 100644 index 000000000..e173e17c6 --- /dev/null +++ b/man/statsplotbetween.Rd @@ -0,0 +1,28 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/statsplotbetween.h.R +\name{statsplotbetween} +\alias{statsplotbetween} +\title{Stats Plot Between} +\usage{ +statsplotbetween(data, dep, group) +} +\arguments{ +\item{data}{.} + +\item{dep}{.} + +\item{group}{.} +} +\value{ +A results object containing: +\tabular{llllll}{ +\code{results$text} \tab \tab \tab \tab \tab a preformatted \cr +\code{results$text1} \tab \tab \tab \tab \tab a preformatted \cr +\code{results$text2} \tab \tab \tab \tab \tab a preformatted \cr +\code{results$plothtml} \tab \tab \tab \tab \tab a html \cr +\code{results$plot} \tab \tab \tab \tab \tab an image \cr +} +} +\description{ +Stats Plot Between +} diff --git a/man/tree.Rd b/man/tree.Rd index 21177acdb..ddce4af29 100644 --- a/man/tree.Rd +++ b/man/tree.Rd @@ -4,27 +4,23 @@ \alias{tree} \title{Decision Tree} \usage{ -tree(data, dep, group, alt = "notequal", varEq = TRUE) +tree(data, vars, target) } \arguments{ \item{data}{.} -\item{dep}{.} +\item{vars}{explanatory variables} -\item{group}{.} - -\item{alt}{.} - -\item{varEq}{.} +\item{target}{target variable} } \value{ A results object containing: \tabular{llllll}{ \code{results$todo} \tab \tab \tab \tab \tab a preformatted \cr \code{results$text1} \tab \tab \tab \tab \tab a preformatted \cr -\code{results$plot} \tab \tab \tab \tab \tab an image \cr +\code{results$plot2} \tab \tab \tab \tab \tab an image \cr } } \description{ -Decision Tree +Function for making Decision Trees. } diff --git a/tododata/description.txt b/tododata/description.txt new file mode 100644 index 000000000..7b3adc082 --- /dev/null +++ b/tododata/description.txt @@ -0,0 +1,63 @@ +Package: ClinicoPath +Type: Package +Title: Analysis for Clinicopathological Research +Version: 0.0.1.0003 +Date: 2020-03-22 +Authors@R: + person(given = "Serdar", + family = "Balci", + role = c("aut", "cre"), + email = "drserdarbalci@gmail.com", + comment = c(ORCID = "0000-0002-7852-3851")) +Maintainer: Serdar Balci +Description: Analysis for Clinicopathological Research + ClinicoPath help researchers to generate natural language summaries of their + dataset, generate cross tables with statistical tests, and survival analysis + with survival tables, survival plots, and natural language summaries. +License: GPL-3 +Encoding: UTF-8 +LazyData: true +Roxygen: list(markdown = TRUE) +Depends: + R (>= 3.6) +Imports: + jmvcore (>= 0.8.5), + R6, + dplyr, + tableone, + tangram, + survival, + survminer, + finalfit, + ggstatsplot, + irr, + explore, + caret, + networkD3 +Remotes: + ndphillips/FFTrees, + easystats/parameters, + easystats/bayestestR, + easystats/effectsize, + easystats/correlation, + easystats/modelbased, + easystats/insight, + easystats/report +Suggests: + rlang, + tidyselect, + purrr, + glue, + janitor, + ggplot2, + forcats, + knitr, + kableExtra, + scales, + yarrr, + circlize, + randomForest +RoxygenNote: 7.0.2 +VignetteBuilder: knitr +URL: https://github.com/sbalci/ClinicoPathJamoviModule/, https://sbalci.github.io/ClinicoPathJamoviModule/ +BugReports: https://github.com/sbalci/ClinicoPathJamoviModule/issues/ diff --git a/tododata/statsplot21.txt b/tododata/statsplot21.txt new file mode 100644 index 000000000..46d54f54f --- /dev/null +++ b/tododata/statsplot21.txt @@ -0,0 +1,353 @@ +#' @importFrom R6 R6Class +#' @import jmvcore +#' @import ggplot2 +#' @import ggstatsplot +#' @import ggalluvial +#' @importFrom rlang .data +#' @importFrom ggalluvial StatStratum +# + + +statsplot2Class <- if (requireNamespace('jmvcore')) R6::R6Class( + "statsplot2Class", + inherit = statsplot2Base, + private = list( + .run = function() { + + StatStratum <- ggalluvial::StatStratum + + # TODO ---- + + todo <- glue::glue( + "This Module is still under development + πŸ”¬πŸ”¬πŸ”¬πŸ”¬ UNDER CONSTRUCTION πŸ› β›”οΈβš οΈπŸ”© + - + - " + ) + + + self$results$todo$setContent(todo) + + if (is.null(self$options$dep) || is.null(self$options$group)) + return() + + if (nrow(self$data) == 0) + stop('Data contains no (complete) rows') + + mydata <- self$data + + mydep <- self$data[[self$options$dep]] + + mygroup <- self$data[[self$options$group]] + + + # klass <- print( + # list( + # "mydep" = c(typeof(mydep), class(mydep)), + # "mygroup" = c(typeof(mygroup), class(mygroup)) + # ) + # ) + + + # self$results$text1$setContent(klass) + + + # plotData <- data.frame(gr = mygroup, + # dp = mydep) + # plotData <- jmvcore::naOmit(plotData) + # mydata_changes <- plotData %>% + # dplyr::group_by(gr, dp) %>% + # dplyr::tally(x = .) + + # self$results$text2$setContent(mydata_changes) + + # plotData <- data.frame(gr = mygroup, + # dp = mydep) + # plotData <- jmvcore::naOmit(plotData) + + + # mydata_changes <- plotData %>% + # dplyr::group_by(gr, dp) %>% + # dplyr::tally(x = .) + + + # deneme <- ggalluvial::is_alluvia_form( + # as.data.frame(mydata_changes), + # axes = 1:2, silent = TRUE) + + # nodes = data.frame("name" = + # c(self$options$group, + # self$options$dep)) + # + # links <- mydata_changes + # + # names(links) = c("source", "target", "value") + # + # deneme <- networkD3::sankeyNetwork(Links = links, Nodes = nodes, + # Source = "source", Target = "target", + # Value = "value", NodeID = "name", + # fontSize= 12, nodeWidth = 30) + + + + # self$results$text3$setContent(deneme) + + # independent, factor, continuous ---- + + + }, + + .plot = function(image, ...) { # <-- the plot function + + + if (is.null(self$options$dep) || is.null(self$options$group)) + return() + + if (nrow(self$data) == 0) + stop('Data contains no (complete) rows') + + direction <- self$options$direction + + distribution <- self$options$distribution + + mydata <- self$data + + mydep <- self$data[[self$options$dep]] + + mygroup <- self$data[[self$options$group]] + + contin <- c("integer", "numeric", "double") + categ <- c("factor") + + # independent ---- + + if (direction == "independent") { + + # independent, factor, continuous ---- + + if (class(mygroup) == "factor" && class(mydep) %in% contin) { + + # ggbetweenstats violin plots for comparisons between groups/conditions + + plotData <- data.frame(gr = mygroup, + dp = jmvcore::toNumeric(mydep)) + plotData <- jmvcore::naOmit(plotData) + + plot <- ggstatsplot::ggbetweenstats( + data = plotData, + x = gr, + y = dp, + type = distribution + ) + + # independent, continuous, continuous ---- + + } else if (class(mygroup) %in% contin && class(mydep) %in% contin) { + + # ggscatterstats scatterplots for correlations between two variables + + plotData <- data.frame(gr = jmvcore::toNumeric(mygroup), + dp = jmvcore::toNumeric(mydep)) + plotData <- jmvcore::naOmit(plotData) + + plot <- ggstatsplot::ggscatterstats( + data = plotData, + x = gr, + y = dp + ) + + # independent, factor, factor ---- + + } else if (class(mygroup) == "factor" && class(mydep) == "factor") { + + + # ggbarstats bar charts for categorical data + + plotData <- data.frame(gr = mygroup, + dp = mydep) + + plotData <- jmvcore::naOmit(plotData) + + plot <- ggstatsplot::ggbarstats( + data = plotData, + main = gr, + condition = dp + ) + + # independent, continuous, factor ---- + + } else if (class(mygroup) %in% contin && class(mydep) == "factor") { + + plot <- "Not Available" + + } + + # repeated ---- + + } else if (direction == "repeated") { + + # repeated, factor, continuous ---- + + if (class(mygroup) == "factor" && class(mydep) %in% contin) { + + # ggwithinstats violin plots for comparisons within groups/conditions + + plotData <- data.frame(gr = mygroup, + dp = jmvcore::toNumeric(mydep)) + plotData <- jmvcore::naOmit(plotData) + + + plot <- ggstatsplot::ggwithinstats( + data = plotData, + x = gr, + y = dp, + type = distribution + ) + + # repeated, continuous, continuous ---- + + + } else if (class(mygroup) %in% contin && class(mydep) %in% contin) { + + plot <- c("Not Available") + + + + # my.rmc <- rmcorr::rmcorr(participant = Subject, + # measure1 = PacO2, + # measure2 = pH, + # dataset = rmcorr::bland1995) + # + # plot(my.rmc, overall = TRUE) + # + # ggplot2::ggplot(rmcorr::bland1995, + # ggplot2::aes(x = PacO2, + # y = pH, + # group = factor(Subject), + # color = factor(Subject) + # ) + # ) + + # ggplot2::geom_point(ggplot2::aes(colour = factor(Subject))) + + # ggplot2::geom_line(ggplot2::aes(y = my.rmc$model$fitted.values), linetype = 1) + + + + # repeated, factor, factor ---- + + + + } else if (class(mygroup) == "factor" && class(mydep) == "factor") { + + # http://corybrunson.github.io/ggalluvial/ + + + plotData <- data.frame(gr = mygroup, + dp = mydep) + + plotData <- jmvcore::naOmit(plotData) + + + mydata_changes <- plotData %>% + dplyr::group_by(gr, dp) %>% + dplyr::tally(x = .) + + + # head(as.data.frame(UCBAdmissions), n = 12) + + # ggalluvial::is_alluvia_form( + # as.data.frame(UCBAdmissions), + # axes = 1:3, silent = TRUE) + + + + # plot <- ggplot(as.data.frame(UCBAdmissions), + # aes(y = Freq, axis1 = Gender, axis2 = Dept)) + + # geom_alluvium(aes(fill = Admit), width = 1/12) + + # geom_stratum(width = 1/12, fill = "black", color = "grey") + + # geom_label(stat = "stratum", infer.label = TRUE) + + # scale_x_discrete(limits = c("Gender", "Dept"), expand = c(.05, .05)) + + # scale_fill_brewer(type = "qual", palette = "Set1") + + # ggtitle("UC Berkeley admissions and rejections, by sex and department") + + + + + + stratum <- ggalluvial::StatStratum + + plot <- ggplot2::ggplot(data = mydata_changes, + ggplot2::aes(axis1 = gr, + axis2 = dp, + y = n)) + + ggplot2::scale_x_discrete(limits = c(self$options$group, self$options$dep), + expand = c(.1, .05) + ) + + ggplot2::xlab(self$options$group) + + ggalluvial::geom_alluvium(ggplot2::aes(fill = gr, + colour = gr + )) + + ggalluvial::geom_stratum() + + ggalluvial::stat_stratum(geom = "stratum") + + ggplot2::geom_label(stat = stratum, infer.label = TRUE) + + + # ggalluvial::geom_stratum(stat = "stratum", label.strata = TRUE) + + # ggplot2::geom_text(stat = "stratum", infer.label = TRUE) + + # ggplot2::geom_text(label.strata = TRUE) + + # ggalluvial::geom_stratum() + ggplot2::theme_minimal() + # ggplot2::ggtitle(paste0("Changes in ", self$options$group)) + # + # + # nodes = data.frame("name" = + # c(self$options$group, + # self$options$dep)) + # + # links <- mydata_changes + # + # names(links) = c("source", "target", "value") + # + # plot <- networkD3::sankeyNetwork(Links = links, Nodes = nodes, + # Source = "source", Target = "target", + # Value = "value", NodeID = "name", + # fontSize= 12, nodeWidth = 30) + + # library(networkD3) + # nodes = data.frame("name" = + # c("Node A", # Node 0 + # "Node B", # Node 1 + # "Node C", # Node 2 + # "Node D"))# Node 3 + # links = as.data.frame(matrix(c( + # 0, 1, 10, # Each row represents a link. The first number + # 0, 2, 20, # represents the node being conntected from. + # 1, 3, 30, # the second number represents the node connected to. + # 2, 3, 40),# The third number is the value of the node + # byrow = TRUE, ncol = 3)) + # names(links) = c("source", "target", "value") + # sankeyNetwork(Links = links, Nodes = nodes, + # Source = "source", Target = "target", + # Value = "value", NodeID = "name", + # fontSize= 12, nodeWidth = 30) + + # plot <- c("Under Construction") + + # plot <- list(plot1, + # plot2) + + # repeated, continuous, factor ---- + + + } else if (class(mygroup) %in% contin && class(mydep) == "factor") { + + plot <- c("Not Available") + + } + + } + + + print(plot) + TRUE + + }) +) diff --git a/tododata/todo.Rmd b/tododata/todo.Rmd index 87a0e9227..4e92a5742 100644 --- a/tododata/todo.Rmd +++ b/tododata/todo.Rmd @@ -1,5 +1,536 @@ --- title: "ToDo" +--- + +``` + # gtsummary + + # myvars <- jmvcore::constructFormula(terms = self$options$vars) + # myvars <- jmvcore::decomposeFormula(formula = myvars) + # myvars <- unlist(myvars) + # mytableone2 <- self$data %>% + # dplyr::select(myvars) + # mytableone2 <- gtsummary::tbl_summary(mytableone2) + # self$results$text2$setContent(mytableone2) +``` + + + # - name: outcomeLevel + # title: | + # Select Event (Death, Recurrence) + # type: Level + # variable: (outcome) + + + + + + + +--- + +, +arsenal, + +rlang, +knitr, +remotes, +kableExtra, + +caret, +irr +Remotes: + + +easystats/bayestestR, +easystats/performance, +easystats/parameters, +easystats/report +Suggests: + effectsize, +emmeans, +rmarkdown, +igraph, +iterators, +rms, +commonmark, +sass + + + + + + + +``` +# # +# # +# # if (is.null(self$options$dep) || is.null(self$options$group)) +# # return() +# # +# # mydata <- self$data +# # +# # mydep <- self$data[[self$options$dep]] +# # +# # mygroup <- self$data[[self$options$group]] +# # +# # +# # # klass <- print( +# # # list( +# # # "mydep" = c(typeof(mydep), class(mydep)), +# # # "mygroup" = c(typeof(mygroup), class(mygroup)) +# # # ) +# # # ) +# # +# # +# # # self$results$text1$setContent(klass) +# # +# # +# # # plotData <- data.frame(gr = mygroup, +# # # dp = mydep) +# # # plotData <- jmvcore::naOmit(plotData) +# # # mydata_changes <- plotData %>% +# # # dplyr::group_by(gr, dp) %>% +# # # dplyr::tally(x = .) +# # # +# # # self$results$text2$setContent(mydata_changes) +# # # +# # # plotData <- data.frame(gr = mygroup, +# # # dp = mydep) +# # # +# # # plotData <- jmvcore::naOmit(plotData) +# # # +# # # +# # # mydata_changes <- plotData %>% +# # # dplyr::group_by(gr, dp) %>% +# # # dplyr::tally(x = .) +# # # +# # # +# # # deneme <- ggalluvial::is_alluvia_form( +# # # as.data.frame(mydata_changes), +# # # axes = 1:2, silent = TRUE) +# # +# # # nodes = data.frame("name" = +# # # c(self$options$group, +# # # self$options$dep)) +# # # +# # # links <- mydata_changes +# # # +# # # names(links) = c("source", "target", "value") +# # # +# # # deneme <- networkD3::sankeyNetwork(Links = links, Nodes = nodes, +# # # Source = "source", Target = "target", +# # # Value = "value", NodeID = "name", +# # # fontSize= 12, nodeWidth = 30) +# # +# # +# # +# # # self$results$text3$setContent(deneme) +# # +# # +# # +# # +# # # Prepare Data for Plot ---- +# # +# # direction <- self$options$direction +# # +# # mydata <- self$data +# # +# # mydep <- self$data[[self$options$dep]] +# # +# # mygroup <- self$data[[self$options$group]] +# # +# # contin <- c("integer", "numeric", "double") +# # categ <- c("factor") +# # +# # # independent, factor, continuous ---- +# # # ggbetweenstats violin plots for comparisons between groups/conditions +# # if (direction == "independent" && class(mygroup) == "factor" && class(mydep) %in% contin) { +# # plotData <- data.frame(gr = mygroup, +# # dp = jmvcore::toNumeric(mydep)) +# # +# # +# # +# # todo <- glue::glue( +# # "This Module is still under development +# # πŸ”¬πŸ”¬πŸ”¬πŸ”¬ UNDER CONSTRUCTION πŸ› β›”οΈβš οΈπŸ”© +# # - +# # - " +# # ) +# # +# # +# # +# # } +# # +# # +# # # independent, continuous, continuous ---- +# # # ggscatterstats scatterplots for correlations between two variables +# # +# # if (direction == "independent" && class(mygroup) %in% contin && class(mydep) %in% contin) { +# # plotData <- data.frame(gr = jmvcore::toNumeric(mygroup), +# # dp = jmvcore::toNumeric(mydep)) +# # +# # +# # +# # +# # todo <- glue::glue( +# # "This Module is still under development +# # πŸ”¬πŸ”¬πŸ”¬πŸ”¬ UNDER CONSTRUCTION πŸ› β›”οΈβš οΈπŸ”© +# # - +# # - " +# # ) +# # } +# # +# # +# # # independent, factor, factor ---- +# # # ggbarstats bar charts for categorical data +# # if (direction == "independent" && class(mygroup) == "factor" && class(mydep) == "factor") { +# # +# # plotData <- data.frame(gr = mygroup, +# # dp = mydep) +# # +# # +# # +# # todo <- glue::glue( +# # "This Module is still under development +# # πŸ”¬πŸ”¬πŸ”¬πŸ”¬ UNDER CONSTRUCTION πŸ› β›”οΈβš οΈπŸ”© +# # - +# # - " +# # ) +# # +# # +# # } +# # +# # # independent, continuous, factor ---- +# # +# # if (direction == "independent" && class(mygroup) %in% contin && class(mydep) == "factor") { +# # todo <- glue::glue( +# # "This Module is still under development +# # πŸ”¬πŸ”¬πŸ”¬πŸ”¬ UNDER CONSTRUCTION πŸ› β›”οΈβš οΈπŸ”© +# # - Please switch the values: factor variable should be on x-axis and continuous variable should be on y-axis +# # - " +# # ) +# # +# # stop("Please switch the values: factor variable should be on x-axis and continuous variable should be on y-axis") +# # } +# # +# # +# # +# # # repeated, factor, continuous ---- +# # # ggwithinstats violin plots for comparisons within groups/conditions +# # +# # +# # +# # if (direction == "repeated" && class(mygroup) == "factor" && class(mydep) %in% contin) { +# # plotData <- data.frame(gr = mygroup, +# # dp = jmvcore::toNumeric(mydep)) +# # +# # +# # +# # todo <- glue::glue( +# # "This Module is still under development +# # πŸ”¬πŸ”¬πŸ”¬πŸ”¬ UNDER CONSTRUCTION πŸ› β›”οΈβš οΈπŸ”© +# # - +# # - " +# # ) +# # +# # +# # } +# # +# # +# # # repeated, continuous, continuous ---- +# # # rmcorr::rmcorr() +# # +# # +# # if (direction == "repeated" && class(mygroup) %in% contin && class(mydep) %in% contin) { +# # todo <- glue::glue( +# # "This Module is still under development +# # πŸ”¬πŸ”¬πŸ”¬πŸ”¬ UNDER CONSTRUCTION πŸ› β›”οΈβš οΈπŸ”© +# # - Currently this module does not support repeated measures correlation. +# # - " +# # ) +# # +# # +# # stop("Currently this module does not support repeated measures correlation.") +# # +# # } +# # +# # +# # # repeated, factor, factor ---- +# # # http://corybrunson.github.io/ggalluvial/ +# # +# # if (direction == "repeated" && class(mygroup) == "factor" && class(mydep) == "factor") { +# # plotData <- data.frame(gr = mygroup, +# # dp = mydep) +# # +# # +# # +# # todo <- glue::glue( +# # "This Module is still under development +# # πŸ”¬πŸ”¬πŸ”¬πŸ”¬ UNDER CONSTRUCTION πŸ› β›”οΈβš οΈπŸ”© +# # - +# # - " +# # ) +# # } +# # +# # # repeated, continuous, factor ---- +# # +# # if (direction == "repeated" && class(mygroup) %in% contin && class(mydep) == "factor") { +# # +# # todo <- glue::glue( +# # "This Module is still under development +# # πŸ”¬πŸ”¬πŸ”¬πŸ”¬ UNDER CONSTRUCTION πŸ› β›”οΈβš οΈπŸ”© +# # - Please switch the values: factor variable should be on x-axis and continuous variable should be on y-axis +# # - " +# # ) +# # +# # +# # stop("Please switch the values: factor variable should be on x-axis and continuous variable should be on y-axis") +# # +# # +# # } +# +# +# +# +# +# # Results ---- +# +# +# +# # Send Data to Plot ---- +# +# # plotData <- jmvcore::naOmit(plotData) +# # image <- self$results$plot +# # image$setState(plotData) +# +# +# # } +# +# +# # , +# # +# # .plot = function(image, ...) { # <-- the plot function ---- +# # +# # +# # if (is.null(self$options$dep) || is.null(self$options$group)) +# # return() +# # +# # +# # plotData <- image$state +# # +# # direction <- self$options$direction +# # +# # mydata <- self$data +# # +# # mydep <- self$data[[self$options$dep]] +# # +# # mygroup <- self$data[[self$options$group]] +# # +# # contin <- c("integer", "numeric", "double") +# # categ <- c("factor") +# # +# # # independent, factor, continuous ---- +# # # ggbetweenstats violin plots for comparisons between groups/conditions +# # +# # if (direction == "independent" && class(mygroup) == "factor" && class(mydep) %in% contin) { +# # +# # plot <- ggstatsplot::ggbetweenstats( +# # data = plotData, +# # x = gr, +# # y = dp +# # ) +# # } +# # +# # # independent, continuous, continuous ---- +# # # ggscatterstats scatterplots for correlations between two variables +# # +# # +# # if (direction == "independent" && class(mygroup) %in% contin && class(mydep) %in% contin) { +# # +# # plot <- ggstatsplot::ggscatterstats( +# # data = plotData, +# # x = gr, +# # y = dp +# # ) +# # +# # } +# # +# # # independent, factor, factor ---- +# # # ggbarstats bar charts for categorical data +# # +# # +# # if (direction == "independent" && class(mygroup) == "factor" && class(mydep) == "factor") { +# # +# # +# # +# # plot <- ggstatsplot::ggbarstats( +# # data = plotData, +# # main = gr, +# # condition = dp +# # ) +# # } +# # +# # # repeated, factor, continuous ---- +# # # ggwithinstats violin plots for comparisons within groups/conditions +# # +# # +# # if (direction == "repeated" && class(mygroup) == "factor" && class(mydep) %in% contin) { +# # +# # +# # plot <- ggstatsplot::ggwithinstats( +# # data = plotData, +# # x = gr, +# # y = dp +# # ) +# # +# # } +# # +# # # repeated, continuous, continuous ---- +# # # rmcorr::rmcorr() +# # +# # # my.rmc <- rmcorr::rmcorr(participant = Subject, +# # # measure1 = PacO2, +# # # measure2 = pH, +# # # dataset = rmcorr::bland1995) +# # # +# # # plot(my.rmc, overall = TRUE) +# # # +# # # ggplot2::ggplot(rmcorr::bland1995, +# # # ggplot2::aes(x = PacO2, +# # # y = pH, +# # # group = factor(Subject), +# # # color = factor(Subject) +# # # ) +# # # ) + +# # # ggplot2::geom_point(ggplot2::aes(colour = factor(Subject))) + +# # # ggplot2::geom_line(ggplot2::aes(y = my.rmc$model$fitted.values), linetype = 1) +# # +# # +# # +# # # repeated, factor, factor ---- +# # # http://corybrunson.github.io/ggalluvial/ +# # # networkD3 +# # +# # +# # if (direction == "repeated" && class(mygroup) == "factor" && class(mydep) == "factor") { +# # +# # +# # mydata_changes <- plotData %>% +# # dplyr::group_by(gr, dp) %>% +# # dplyr::tally(x = .) +# # +# # +# # # head(as.data.frame(UCBAdmissions), n = 12) +# # +# # # ggalluvial::is_alluvia_form( +# # # as.data.frame(UCBAdmissions), +# # # axes = 1:3, silent = TRUE) +# # +# # +# # +# # # plot <- ggplot(as.data.frame(UCBAdmissions), +# # # aes(y = Freq, axis1 = Gender, axis2 = Dept)) + +# # # geom_alluvium(aes(fill = Admit), width = 1/12) + +# # # geom_stratum(width = 1/12, fill = "black", color = "grey") + +# # # geom_label(stat = "stratum", infer.label = TRUE) + +# # # scale_x_discrete(limits = c("Gender", "Dept"), expand = c(.05, .05)) + +# # # scale_fill_brewer(type = "qual", palette = "Set1") + +# # # ggtitle("UC Berkeley admissions and rejections, by sex and department") +# # +# # +# # +# # +# # +# # stratum <- ggalluvial::StatStratum +# # +# # plot <- ggplot2::ggplot(data = mydata_changes, +# # ggplot2::aes(axis1 = gr, +# # axis2 = dp, +# # y = n)) + +# # ggplot2::scale_x_discrete(limits = c(self$options$group, self$options$dep), +# # expand = c(.1, .05) +# # ) + +# # ggplot2::xlab(self$options$group) + +# # ggalluvial::geom_alluvium(ggplot2::aes(fill = gr, +# # colour = gr +# # )) + +# # ggalluvial::geom_stratum() + +# # ggalluvial::stat_stratum(geom = "stratum") + +# # ggplot2::geom_label(stat = stratum, infer.label = TRUE) + +# # +# # # ggalluvial::geom_stratum(stat = "stratum", label.strata = TRUE) + +# # # ggplot2::geom_text(stat = "stratum", infer.label = TRUE) + +# # # ggplot2::geom_text(label.strata = TRUE) + +# # # ggalluvial::geom_stratum() +# # ggplot2::theme_minimal() +# # # ggplot2::ggtitle(paste0("Changes in ", self$options$group)) +# # # +# # # +# # # nodes = data.frame("name" = +# # # c(self$options$group, +# # # self$options$dep)) +# # # +# # # links <- mydata_changes +# # # +# # # names(links) = c("source", "target", "value") +# # # +# # # plot <- networkD3::sankeyNetwork(Links = links, Nodes = nodes, +# # # Source = "source", Target = "target", +# # # Value = "value", NodeID = "name", +# # # fontSize= 12, nodeWidth = 30) +# # +# # # library(networkD3) +# # # nodes = data.frame("name" = +# # # c("Node A", # Node 0 +# # # "Node B", # Node 1 +# # # "Node C", # Node 2 +# # # "Node D"))# Node 3 +# # # links = as.data.frame(matrix(c( +# # # 0, 1, 10, # Each row represents a link. The first number +# # # 0, 2, 20, # represents the node being conntected from. +# # # 1, 3, 30, # the second number represents the node connected to. +# # # 2, 3, 40),# The third number is the value of the node +# # # byrow = TRUE, ncol = 3)) +# # # names(links) = c("source", "target", "value") +# # # sankeyNetwork(Links = links, Nodes = nodes, +# # # Source = "source", Target = "target", +# # # Value = "value", NodeID = "name", +# # # fontSize= 12, nodeWidth = 30) +# # +# # # plot <- c("Under Construction") +# # +# # # plot <- list(plot1, +# # # plot2) +# # +# # +# # +# # } +# # +# # +# # +# # print(plot) +# # TRUE +# # +# # } +# # +# # ) +# # ) +``` + + + + + + + + + + + + + + --- # Packages @@ -247,6 +778,19 @@ devtools::check() ``` +```{r eval=FALSE, include=FALSE} +# From CRAN +# install.packages("attachment") +# From github +# remotes::install_github("ThinkR-open/attachment") + +# If you correctly called the package dependencies in the {roxygen2} skeleton, in your functions, in your Rmarkdown vignettes and in your tests, you only need to run attachment::att_to_description()just before devtools::check(). And that’s it, there is nothing else to remember ! +attachment::att_to_description() + +``` + + + ```{r pkgdown build, include=FALSE} rmarkdown::render('/Users/serdarbalciold/histopathRprojects/ClinicoPath/README.Rmd', encoding = 'UTF-8', knit_root_dir = '~/histopathRprojects/ClinicoPath', quiet = TRUE) @@ -300,6 +844,11 @@ system(command = gitCommand, intern = TRUE) # jmvtools::addAnalysis(name='statsplot2', title='GGStatsPlot2') +# jmvtools::addAnalysis(name='statsplotbetween', title='Stats Plot Between') + +# jmvtools::addAnalysis(name='competingsurvival', title='Competing Survival') + + # jmvtools::addAnalysis(name='scat2', title='scat2') # jmvtools::addAnalysis(name='decisioncalculator', title='Decision Calculator') @@ -329,11 +878,13 @@ jmvtools::install() -```{r construct} +```{r construct formula} formula <- jmvcore::constructFormula(terms = c("A", "B", "C"), dep = "D") jmvcore::constructFormula(terms = list("A", "B", c("C", "D")), dep = "E") +jmvcore::constructFormula(terms = "A") + jmvcore::constructFormula(terms = list("A", "B", "C")) @@ -379,6 +930,24 @@ jmvcore::decomposeTerm(term = composeTerm) deneme <- readxl::read_xlsx(path = here::here("tododata", "histopathology-template2019-11-25.xlsx")) ``` +```{r} +inherits(deneme$Sex, "character") +``` + +```{r} +ggstatsplot::ggbetweenstats(data = deneme, + x = Sex, + y = Age, + type = "p") + +ClinicoPath::statsplot2( + data = deneme, + dep = Age, + group = Sex) +``` + + + ```{r writesummary, eval=FALSE, include=FALSE} devtools::install(upgrade = FALSE, quick = TRUE) @@ -504,6 +1073,10 @@ formula <- as.formula(formula) my_group <- "lvi" + +jmvcore::composeTerm(my_group) + + my_dep <- "age" formula <- paste0('x = ', group, 'y = ', dep) @@ -993,3 +1566,96 @@ mypairwisedescription) # ) ``` + + + +```{r read csv} +library(readr) +BreastCancer <- read_csv("data/BreastCancer.csv") +View(BreastCancer) +``` + + +```{r} + +mytarget <- "Class" +myvars <- c("Cl.thickness", + "Cell.size", + "Cell.shape", + "Marg.adhesion", + "Epith.c.size", + "Bare.nuclei", + "Bl.cromatin", + "Normal.nucleoli", + "Mitoses") + +# mytarget <- jmvcore::composeTerms(mytarget) +# mytarget <- jmvcore::constructFormula(terms = mytarget) + +BreastCancer %>% + dplyr::select(all_of(mytarget), all_of(myvars)) %>% + explore::explain_tree(target = .data[[mytarget]]) + + + +``` + + + + + +```{r} + + +mytarget <- "Class" +myvars <- c("Cl.thickness", + "Cell.size", + "Cell.shape", + "Marg.adhesion", + "Epith.c.size", + "Bare.nuclei", + "Bl.cromatin", + "Normal.nucleoli", + "Mitoses") + +mydata <- BreastCancer %>% + select(mytarget, myvars) + +formula <- jmvcore::constructFormula(terms = mytarget) + +formula <- paste(formula, '~ .') + +formula <- as.formula(formula) + + # Create an FFTrees object from the data + FFTrees.fft <- FFTrees::FFTrees( + formula = formula, + data = mydata + ) + + # Plot the best tree applied to the test data + plot2 <- plot(FFTrees.fft, + data = mydata + # , + # main = "Heart Disease", + # decision.labels = c("Healthy", "Disease") + ) +``` + + + + + +```{r} +devtools::install(upgrade = FALSE, quick = TRUE) + + +deneme <- readxl::read_xlsx(path = here::here("tododata", "histopathology-template2019-11-25.xlsx")) + + +ClinicoPath::statsplotbetween( + data = deneme, + dep = LVI, + group = PNI) +``` + diff --git a/vignettes/module_development_jamovi.Rmd b/vignettes/module_development_jamovi.Rmd index 2444278fa..a1f2fc8cd 100644 --- a/vignettes/module_development_jamovi.Rmd +++ b/vignettes/module_development_jamovi.Rmd @@ -150,8 +150,40 @@ https://github.com/jamovi/jmv/blob/master/jamovi/ancova.r.yaml#L174 +# `build` folder + +## `js` folder + +### event.js + + + +## R3.6.1-macos + + + +# Installing + +# `jmvtools::install` + +# `devtools::install` + + +```r +devtools::install(upgrade = FALSE, quick = TRUE) +``` + + + # General +## YAML + + + + + + ## RStudio options ## .gitignore