Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
sbalci committed Jan 19, 2024
1 parent e267c1c commit 0461232
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 5 deletions.
7 changes: 4 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Type: Package
Package: ClinicoPathDescriptives
Title: Descriptives Functions for Clinicopathological Research
Version: 0.0.2.24
Date: 2024-01-13
Version: 0.0.2.25
Date: 2024-01-19
Authors@R:
person(given = "Serdar",
family = "Balci",
Expand Down Expand Up @@ -49,7 +49,8 @@ Imports:
rsvg,
shiny,
gtsummary,
gtExtras
gtExtras,
UpSetR
Remotes:
nbarrowman/vtree@ffa53d4ea5050fa9b26918f4bb30595e91a0f489
Encoding: UTF-8
Expand Down
44 changes: 44 additions & 0 deletions R/venn.b.R
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,19 @@ vennClass <- if (requireNamespace('jmvcore'))
image$setState(plotData)



mydata2 <- mydata %>%
dplyr::mutate(dplyr::across(.cols = dplyr::everything(), ~as.integer(.)))


plotData2 <- list("mydata" = mydata2,
"names" = names(mydata2)
)

image2 <- self$results$plot2
image2$setState(plotData2)


}

}
Expand Down Expand Up @@ -148,5 +161,36 @@ vennClass <- if (requireNamespace('jmvcore'))
print(plot)
TRUE
}


,

.plot2 = function(image, ggtheme, theme, ...) {
# the plot2 function ----


#Errors ----

if (is.null(self$options$var1) || is.null(self$options$var2))
return()

if (nrow(self$data) == 0)
stop('Data contains no (complete) rows')


# Prepare Data ----

results <- image$state

mydata2 <- results$mydata

# namescolumn2 <- results$names

plot2 <- UpSetR::upset(mydata2, order.by = "freq")

# Print plot2 ----
print(plot2)
TRUE
}
)
)
4 changes: 2 additions & 2 deletions jamovi/0000.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
title: Descriptives Functions for Clinicopathological Research
name: ClinicoPathDescriptives
version: 0.0.2.24
version: 0.0.2.25
jms: '1.0'
authors:
- Serdar Balci
maintainer: Serdar Balci <[email protected]>
date: '2024-01-13'
date: '2024-01-19'
type: R
description: >-
Descriptives Functions for Clinicopathological Research Descriptive functions
Expand Down
11 changes: 11 additions & 0 deletions jamovi/venn.r.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,17 @@ items:
renderFun: .plot
requiresData: true


- title: Upset Diagram
name: plot2
type: Image
width: 600
height: 450
renderFun: .plot2
requiresData: true



refs:
- venn
- ClinicoPathJamoviModule
Expand Down

0 comments on commit 0461232

Please sign in to comment.