Code Monkey home page Code Monkey logo

spiroview's Introduction

spiroview

Description

spiroview is an R package that provides the tools to visualize and explore spirometry data in demographic studies. This package is targeted for the healthcare focused researcher who may not have an extensive coding background but wishes to use R for their research study. The spiroview package was developed using R version 4.2.1 (2022-06-23), Platform: x86_64-apple-darwin17.0 (64-bit), and Running under: macOS Big Sur 11.7.4.

Installation

To install the latest version of this package:

require("devtools")
devtools::install_github("annie951977/spiroview", build_vignettes = TRUE)

To run the Shiny app

spiroview::runspiroview()

image

Overview

spiroview at a glance:

ls("package:spiroview")
data(package = "spiroview")
browseVignettes("spiroview")

spiroview contains 10 functions:

formatData is a helper function that reads a csv or tsv datafile and reformats the dataframe so that the dataframe can be easily read into other functions in this dataset.

segregateBy splits a dataframe by a demographic value to allow for the extraction of data relating to a subset of interest.

calculateLLNPret calculates the lower limit of normal for a spirometric measurement based off of inputted demographic variables such as height, age, and gender and the spirometry reference of interest.

calculatePctPret calculates the percent predicted of a spirometry value in your dataset.

calculateMeanPret calculates the mean predicted value for a spirometric measurement based off of inputted demographic variables such as height, age, and gender.

summarizeAllByCategory extracts datainputs matching a certain demographic threshold and outputs summary statistics on a spirometric measurement in the dataset.

viewCategorical produces plots correlating a categorical variable to a spirometric measurement.

viewCategoricalCounts produces plots that showcase the number of datapoints that exist in the dataset for a categorical variable of interest

viewNumerical produces plots correlating a numerical variable to a spirometric measurement.

compareNumerical produces plots correlating a numerical variable to a spirometric measurement annotated by other categorical or numerical demographic variables of interest.

A work flow of the package can be seen below:

For more information on each function, refer to the respective help documentation. For a brief tutorial on how to use the package, view the provided vignette with the function browseVignettes("spiroview").

Contributions

  • formatData uses packages utils and readr to handle file reading

  • segregateBy uses package stringr for string matching

  • calculateLLNPret, calculatePctPret, calculateMeanPret use package rspiro for spirometric equations and calculations

  • summarizeAllByCategory uses package stringr for string matching and package dplyr for filtering

  • viewCategorical,viewCategoricalCounts, and viewNumerical use package ggplot2 for generating plots

  • compareNumerical uses package ggplot2 for generating plots. This function also uses stringr for string matching and dplyr for dataset filtering

References

Acknowledgements

This package was developed as part of an assessment for 2022 BCB410H: Applied Bioinformatics course at the University of Toronto, Toronto, CANADA. spiroview welcomes issues, enhancement requests, and other contributions. To submit an issue, use the GitHub issues.

Package Structure

The package tree structure is provided below.

- spiroview
  ├── DESCRIPTION
  ├── LICENSE
  ├── LICENSE.md
  ├── NAMESPACE
  ├── R
  │   ├── calculatedPredicted.R
  │   ├── data.R
  │   ├── formatData.R
  │   ├── runspiroview.R    
  │   ├── segregateBy.R
  │   ├── summarize.R
  │   ├── viewCategorical.R
  │   └── viewNumerical.R
  ├── README.Rmd
  ├── README.md
  ├── data
  │   ├── GLIData.rda
  │   └── NHANES3Data.rda
  ├── inst
  │   ├── CITATION
  │   ├── extdata
  │   │   ├── GLI_simulated_DB.csv
  │   │   ├── NHANES3_simulated_DB.csv
  │   │   ├── example_dataset_1.csv
  │   │   ├── example_dataset_2.csv
  │   │   ├── example_dataset_3.csv
  │   │   ├── example_dataset_4.csv
  │   │   └── spiroview_overview.png
  │   └── shiny-scripts
  │       └── app.R
  ├── man
  │   ├── GLIData.Rd
  │   ├── NHANES3Data.Rd
  │   ├── calculateLLNPret.Rd
  │   ├── calculateMeanPret.Rd
  │   ├── calculatePctPret.Rd
  │   ├── compareNumerical.Rd
  │   ├── figures
  │   ├── formatData.Rd
  │   ├── segregateBy.Rd
  │   ├── summarizeAllByCategory.Rd
  │   ├── viewCategorical.Rd
  │   ├── viewCategoricalCounts.Rd
  │   └── viewNumerical.Rd
  ├── spiroview.Rproj
  ├── tests
  │   ├── testthat
  │   │   ├── test-calculatedPredicted.R
  │   │   ├── test-formatData.R
  │   │   ├── test-segregateBy.R
  │   │   ├── test-summarize.R
  │   │   ├── test-viewCategorical.R
  │   │   └── test-viewNumerical.R
  │   └── testthat.R
  └── vignettes
      └── Introduction_spiroview.Rmd

spiroview's People

Contributors

annie951977 avatar

Watchers

Kostas Georgiou avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.