Skip to contents

This guide provides guidance on creating Apps in DaVinci using the lineplot module. Walk-throughs for sample app creation are also included to demonstrate various module-specific features.

The lineplot module displays line traces of raw or summary data over time. It also allows to inspect the data underlying each point on the plot through its “data listing” and “data count” tables.

Pre-requisite:


“Parameter” Term Disambiguation

The guide uses the term “parameter” at several places. This term in the guide represents clinical analysis parameters and values such as laboratory values, safety values, etc as used in the clinical dataset context. This can be confused with the word parameter as used in a programming context - “parameters of a function”. Therefore, to fully disambiguate the usage in this guide:

  • Parameter is used exclusively in the clinical dataset context
  • Argument is used to represent parameter of a function in the programming context


Features

lineplot features the following plot and tables:

  • A sequence of lineplot charts that display raw or summaries of time series, optionally grouped by up to two categorical variables. Built-in summary functions are mean and median, but this module also accepts user-supplied functions
  • A table that shows the data that contributes to the last points clicked or brushed in any of those charts
  • A table that provides the count of samples per group and time point.

This module supports bookmarking.

Module arguments

The dv.explorer.parameter::mod_lineplot() module presents mandatory and optional function arguments to the app creator.

Mandatory Arguments

Refer to dv.explorer.parameter::mod_lineplot() for the complete list of arguments and their description.

Input menus

Input menus are integrated as part of the figure title. Portions of the title are stylized as hyperlinks and reveal the relevant pop-up menus when clicked.

Visualizations

Lineplot

This visualization consists of a facetted lineplot based on the set of parameters and grouping variables.

Tables

Subject-level listing

A table containing the listing of the raw data contributing to the last clicked point or brushed set of points on a lineplot.

The single subject table contains a drill-down button that can be used to obtain more information about the subject. This setting requires additional configuration through the receiver_id optional module argument.

Summary listing

A table containing the listing of the summarized data correspoding to the last clicked point or brushed set of points on a lineplot in which a centrality summary function has been selected.

Data count

A table that provides the count of samples per group and time point for the whole plot.

Creating a lineplot application

module_list <- list(
  "lineplot" = dv.explorer.parameter::mod_lineplot(
    module_id = "lineplot",
    bm_dataset_name = "bm",
    group_dataset_name = "sl",
    visit_vars = "VISIT",
    value_vars = c("VALUE1", "VALUE2"),
    subjid_var = "SUBJID",
    cat_var = "PARCAT"
  )
)

bm_dataset <- test_data()[["bm"]]
group_dataset <- test_data()[["sl"]]

dv.manager::run_app(
  data = list("DS" = list(bm = bm_dataset, sl = group_dataset)),
  module_list = module_list,
  filter_data = "sl",
  filter_key = "SUBJID"
)