ggpairsModule2: ggpairsModule2: shiny module server for basic/scatter plot...

Description Usage Arguments Details Value Examples

View source: R/ggpairs.R

Description

Shiny module server for basic/scatter plot for reactive data.

Usage

1
2
3
4
5
6
7
8
9
ggpairsModule2(
  input,
  output,
  session,
  data,
  data_label,
  data_varStruct = NULL,
  nfactor.limit = 20
)

Arguments

input

input

output

output

session

session

data

Reactive data

data_label

Reactive data label

data_varStruct

List of variable structure, Default: NULL

nfactor.limit

nlevels limit for categorical variables, Default: 20

Details

Shiny module server for basic/scatter plot for reactive data.

Value

Shiny module server for basic/scatter plot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
library(shiny);library(DT);library(data.table);library(jstable);library(ggplot2)
library(GGally)

ui <- fluidPage(
   sidebarLayout(
   sidebarPanel(
     ggpairsModuleUI1("ggpairs")
   ),
   mainPanel(
     plotOutput("ggpairs_plot"),
     ggpairsModuleUI2("ggpairs")
   )
 )
)

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

  data <- reactive(mtcars)
  data.label <- reactive(jstable::mk.lev(mtcars))

  out_ggpairs <- callModule(ggpairsModule2, "ggpairs", data = data, data_label = data.label,
                            data_varStruct = NULL)

  output$kaplan_plot <- renderPlot({
    print(out_ggpairs())
  })
}

Example output

Registered S3 method overwritten by 'GGally':
  method from   
  +.gg   ggplot2
Registered S3 methods overwritten by 'lme4':
  method                          from
  cooks.distance.influence.merMod car 
  influence.merMod                car 
  dfbeta.influence.merMod         car 
  dfbetas.influence.merMod        car 

Attaching package:DTThe following objects are masked frompackage:shiny:

    dataTableOutput, renderDataTable

jsmodule documentation built on Oct. 11, 2021, 9:07 a.m.