The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.

Title: Interactive Venn Diagrams
Version: 1.0.0
Description: Creates interactive Venn diagrams using the 'amCharts5' library for 'JavaScript'. They can be used directly from the R console, from 'RStudio', in 'shiny' applications, and in 'rmarkdown' documents.
License: GPL-3
URL: https://github.com/stla/amVennDiagram5
BugReports: https://github.com/stla/amVennDiagram5/issues
Imports: htmlwidgets, partitions, venn, utils
Suggests: shiny
Encoding: UTF-8
RoxygenNote: 7.3.1
NeedsCompilation: no
Packaged: 2024-07-29 17:31:07 UTC; User
Author: Stéphane Laurent [aut, cre], amCharts team [cph]
Maintainer: Stéphane Laurent <laurent_step@outlook.fr>
Repository: CRAN
Date/Publication: 2024-07-31 10:41:07 UTC

Enumeration of Venn diagrams

Description

Given the cardinalities of some sets, returns all possible Venn diagrams of these sets.

Usage

allVennDiagrams(cardinalities, output = "dataframes")

Arguments

cardinalities

vector of positive integers

output

either "lists" or "dataframes"

Value

List of Venn diagrams.


Venn diagram widget

Description

Creates an amVennDiagram widget.

Usage

amVennDiagram(
  data,
  theme = "default",
  legendPosition = "right",
  elementId = NULL
)

Arguments

data

a list such as one returned by makeVennData

theme

the theme: "default", "dark", "dataviz", "frozen", "kelly", "material", "moonrise", or "spirited"

legendPosition

legend position: "right" or "bottom"

elementId

a HTML id (usually useless)

Value

An amVennDiagram widget.

Examples

sets <- list(A = 1:20, B = 10:30, C = 15:35)
dat <- makeVennData(sets)
amVennDiagram(dat, theme = "kelly")

Shiny bindings for 'amVennDiagram'

Description

Output and render functions for using amVennDiagram within Shiny applications and interactive Rmd documents.

Usage

amVennDiagramOutput(outputId, width = "100%", height = "400px")

renderAmVennDiagram(expr, env = parent.frame(), quoted = FALSE)

Arguments

outputId

output variable to read from

width, height

a valid CSS dimension (like "100%", "400px", "auto") or a number, which will be coerced to a string and have "px" appended

expr

an expression that generates an amVennDiagram

env

the environment in which to evaluate expr

quoted

logical, whether expr is a quoted expression (with quote()); this is useful if you want to save an expression in a variable

Value

amVennDiagramOutput returns an output element that can be included in a Shiny UI definition, and renderAmVennDiagram returns a shiny.render.function object that can be included in a Shiny server definition.

Examples

if(require("shiny") && interactive()) {

library(amVennDiagram5)
library(shiny)

sets <- list(A = 1:20, B = 15:38, C = c(0:5, 20, 30:40))
diagram  <- makeVennData(sets)

ui <- fluidPage(
  sidebarLayout(
    sidebarPanel(
      radioButtons(
        "theme", label = "Theme",
        choices = c(
          "default",
          "dark",
          "dataviz",
          "frozen",
          "kelly",
          "material",
          "moonrise",
          "spirited"
        )
      )
    ),
    mainPanel(
      amVennDiagramOutput("diagram", height = "95vh")
    )
  )
)

server <- function(input, output, session) {

  output[["diagram"]] <- renderAmVennDiagram({
    amVennDiagram(
      diagram, theme = input[["theme"]]
    )
  })

}

shinyApp(ui, server)

}

Venn diagram data from a list of sets

Description

Make data for usage in amVennDiagram.

Usage

makeVennData(sets)

Arguments

sets

a named list of vectors representing some sets

Value

A list suitable for usage in amVennDiagram.

Examples

sets <- list(A = 1:20, B = 10:30, C = 15:35)
dat <- makeVennData(sets)
amVennDiagram(dat, theme = "spirited")

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.