Skip to content

Commit

Permalink
better frequency table per discussion #3
Browse files Browse the repository at this point in the history
  • Loading branch information
sbalci committed Apr 19, 2023
1 parent bcbffba commit 667997d
Show file tree
Hide file tree
Showing 20 changed files with 324 additions and 274 deletions.
Binary file removed .DS_Store
Binary file not shown.
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Type: Package
Package: meddecide
Title: Functions for Medical Decision Making in ClinicoPath jamovi Module
Version: 0.0.2.07
Date: 2022-09-20
Version: 0.0.2.08
Date: 2023-04-19
Authors@R:
person(given = "Serdar",
family = "Balci",
Expand Down Expand Up @@ -37,4 +37,4 @@ Imports:
Encoding: UTF-8
LazyData: true
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.1.2
RoxygenNote: 7.2.3
23 changes: 23 additions & 0 deletions R/agreement.b.R
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,29 @@ agreementClass <- if (requireNamespace("jmvcore")) R6::R6Class("agreementClass",
self$results$text$setContent(result)



result3 <- ratings %>%
dplyr::group_by_all() %>%
dplyr::count() %>%
as.data.frame() %>%
htmlTable::htmlTable()

self$results$text2$setContent(result3)



# freqtable <- self$results$freqtable
#
# data_frame <- result3
# for (i in seq_along(data_frame[, 1, drop = T])) {
# freqtable$addRow(rowKey = i, values = c(data_frame[i,]))
# }






result1 <- irr::agree(ratings)

# self$results$text1$setContent(result1[["value"]])
Expand Down
35 changes: 23 additions & 12 deletions R/agreement.h.R
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,9 @@ agreementResults <- if (requireNamespace("jmvcore", quietly=TRUE)) R6::R6Class(
"agreementResults",
inherit = jmvcore::Group,
active = list(
text = function() private$.items[["text"]],
irrtable = function() private$.items[["irrtable"]]),
irrtable = function() private$.items[["irrtable"]],
text2 = function() private$.items[["text2"]],
text = function() private$.items[["text"]]),
private = list(),
public=list(
initialize=function(options) {
Expand All @@ -76,15 +77,6 @@ agreementResults <- if (requireNamespace("jmvcore", quietly=TRUE)) R6::R6Class(
"irr",
"PathologyKappa",
"ClinicoPathJamoviModule"))
self$add(jmvcore::Preformatted$new(
options=options,
name="text",
title="Table",
visible="(sft)",
clearWith=list(
"vars",
"wght",
"exct")))
self$add(jmvcore::Table$new(
options=options,
name="irrtable",
Expand Down Expand Up @@ -121,6 +113,24 @@ agreementResults <- if (requireNamespace("jmvcore", quietly=TRUE)) R6::R6Class(
`title`="p-value",
`type`="number",
`format`="zto,pvalue")),
clearWith=list(
"vars",
"wght",
"exct")))
self$add(jmvcore::Html$new(
options=options,
name="text2",
title="Table",
visible="(sft)",
clearWith=list(
"vars",
"wght",
"exct")))
self$add(jmvcore::Preformatted$new(
options=options,
name="text",
title="Table",
visible="(sft)",
clearWith=list(
"vars",
"wght",
Expand Down Expand Up @@ -168,8 +178,9 @@ agreementBase <- if (requireNamespace("jmvcore", quietly=TRUE)) R6::R6Class(
#' than 3 observers.
#' @return A results object containing:
#' \tabular{llllll}{
#' \code{results$text} \tab \tab \tab \tab \tab a preformatted \cr
#' \code{results$irrtable} \tab \tab \tab \tab \tab a table \cr
#' \code{results$text2} \tab \tab \tab \tab \tab a html \cr
#' \code{results$text} \tab \tab \tab \tab \tab a preformatted \cr
#' }
#'
#' Tables can be converted to data frames with \code{asDF} or \code{\link{as.data.frame}}. For example:
Expand Down
3 changes: 0 additions & 3 deletions R/decision.b.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
#' @title Medical Decision Making
#'
#'
#'
#' @importFrom R6 R6Class
#' @import jmvcore
#'
Expand Down
4 changes: 0 additions & 4 deletions R/decisioncalculator.b.R
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
#' @title Decision Calculator
#'
#'
#'
#'
#' @importFrom R6 R6Class
#' @import jmvcore
#' @importFrom utils data
Expand Down
3 changes: 0 additions & 3 deletions R/kappasizeci.b.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
#' @title Confidence Interval Approach for the Number of Subjects Required
#'
#'
#'
#' @importFrom R6 R6Class
#' @import jmvcore

Expand Down
3 changes: 0 additions & 3 deletions R/kappasizefixedn.b.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
#' @title Lowest Expected Value for a fixed sample size
#'
#'
#'
#' @importFrom R6 R6Class
#' @import jmvcore

Expand Down
3 changes: 0 additions & 3 deletions R/kappasizepower.b.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
#' @title Power Approach for the Number of Subjects Required
#'
#'
#'
#' @importFrom R6 R6Class
#' @import jmvcore

Expand Down
4 changes: 2 additions & 2 deletions jamovi/0000.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
title: Functions for Medical Decision in ClinicoPath jamovi Module
name: meddecide
version: 0.0.2.07
version: 0.0.2.08
jms: '1.0'
authors:
- Serdar Balci
maintainer: Serdar Balci <drserdarbalci@gmail.com>
date: '2022-06-14'
date: '2023-04-19'
type: R
description: |-
This module contains functions for interobserver and intraobserver reliability
Expand Down
2 changes: 1 addition & 1 deletion jamovi/agreement.a.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ options:
- name: sft
title: Frequency Table
title: Frequency Tables
type: Bool
default: false
description:
Expand Down
52 changes: 42 additions & 10 deletions jamovi/agreement.r.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,6 @@ items:
# clearWith:
# - vars

- name: text
title: 'Table'
type: Preformatted
visible: (sft)
clearWith:
- vars
- wght
- exct


# - name: result_cohen
# title: 'result_cohen'
# type: Preformatted
Expand Down Expand Up @@ -97,6 +87,48 @@ items:
- wght
- exct


- name: text2
title: 'Table'
type: Html
visible: (sft)
clearWith:
- vars
- wght
- exct


- name: text
title: 'Table'
type: Preformatted
visible: (sft)
clearWith:
- vars
- wght
- exct





# - name: freqtable
# title: 'Frequency Table'
# type: Table
# columns:
# - name: values
# title: 'Values'
# type: text
# clearWith:
# - vars
# - wght
# - exct







refs:
- irr
- PathologyKappa
Expand Down
3 changes: 2 additions & 1 deletion man/agreement.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

76 changes: 38 additions & 38 deletions man/agreementClass.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 667997d

Please sign in to comment.