Skip to content

SandraKla/reflimR_Shiny

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Shiny App for reflimR

This Shiny App is based on the package reflimR for the estimation of reference limits from routine laboratory results.

Installation

Method 1: Use the function runGitHub() from the package shiny:

if("shiny" %in% rownames(installed.packages())){
  library(shiny)} else{install.packages("shiny")
  library(shiny)}
runGitHub("reflimR_Shiny", "SandraKla")

Method 2: Download the Zip-File from this Shiny App. Unzip the file and set your working direction to the path of the folder. The package shiny (≥ 1.7.1) must be installed before using the Shiny App:

# Test if shiny is installed:
if("shiny" %in% rownames(installed.packages())){
  library(shiny)} else{install.packages("shiny")
  library(shiny)}

And then start the app with the following code:

runApp("app.R")

The package reflimR (≥ 1.0.6), DT (≥ 0.28) and shinydashboard (≥ 0.7.2) is downloaded or imported when starting this app. The used R-Version must be ≥ 4.1.2 (2021-11-01).

Preloaded dataset

Data from the UC Irvine Machine Learning Repository showing livertests has been preloaded into this Shiny App. In addition, the corresponding reference intervals are stored in targetvalues. The reference interval table has been derived from the data published in the Clinical Laboratory Diagnostics by Lothar Thomas, MD.

New data

These columns should be used for new data:

  • Category: Name of the category
  • Age: Age in years
  • Sex: "m" for male and "f" for female
  • Value: Column name is the analyte name, values are the laboratory measures

The data from livertests serves as a template. The data must be saved in csv format. To load new data, the data should be in CSV format with values separated by semicolons (;), and decimal numbers should use a comma (,) as the decimal separator. The first row of the CSV file should contain column headers.

Usage

On the left side, you can use the sidebar to choose the lab parameters and gender. Below in the "Target Values" section, you can load the data from targetvalues or enter your own values. By clicking on "View all plots", all the plots from the different steps can be displayed. In the main panel, you will see the corresponding plot and the outputs.

zlog values are calculated from the dataset and the calculated reference intervals under the "zlog" tab. The lower reference limits (LL) and upper reference limits (UL) can transform any result x into a zlog value using the following equation:

zlog(x) = (log(x)–(log(LL)+ log(UL))/2)*3.92/(log(UL)–log(LL))

Values ranging from –1.96 to 1.96 are considered normal, while values below –5 and above 5 indicate pathological conditions.

Contact

You are welcome to: