Skip to content

R Package to Obtain and Analyze Sex-disaggregated Datasets

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md
Notifications You must be signed in to change notification settings

lifangy6/sexDisaggregate

Repository files navigation

sexDisaggregate

To Obtain and Analyze Sex-disaggregated Datasets

CodeFactor GitHub issues License GitHub language count GitHub commit activity (branch)

Description

sexDisaggregate is an R package that separates CSV datasets by sex, performs comparison visualization and helps users to examine their datasets from a sex-disaggregated perspective.

Installation

To install the latest version of the package:

require("devtools")
devtools::install_github("lifangy6/sexDisaggregate", build_vignettes = TRUE)
library("sexDisaggregate")

To run the shinyApp:

sexDisaggregate::runSexDisaggregate()

Overview

To have a glance of the package:

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

sexDisaggregate contains 2 functions:

Function separateCSV separates provided CSV file into 3 new versions: cleaned both-sex dataframe, female-only dataframe and male-only dataframe.

Function visualizeDiff visualize 4 graphs that show sex percentage and specific category vs. sex in the dataset.

OverviewPlot

Contributions

The author of the package is Fangyi Li.

  • Package ggplot2 is used to create plots in function visualizeDiff.

  • Package cowplot is used to comnine plots in function visualizeDiff.

  • Package shiny is used to develop shinyApp of the package.

References

Acknowledgements

This package was developed as part of an assessment for 2022 BCB410H: Applied Bioinformatics course at the University of Toronto, Toronto, CANADA. sexDisaggregate welcomes issues, enhancement requests, and other contributions. To submit an issue, use the GitHub issues. Many thanks to those who provided feedback to improve this package.

Tree Structure

- sexDisaggregate
  |- sexDisaggregate.Rproj
  |- DESCRIPTION
  |- NAMESPACE
  |- LICENSE
  |- README
  |- inst
    CITATION
    |- extdata
      |- example_data.csv
      |- example_barplot.png
      |- example_densityplot.png
      |- Overview.jpg
    |- shiny-scripts
      |- app.R
  |- man
    |- separateCSV.Rd
    |- visualizeDiff.Rd
    |- runSexDisaggregate.Rd
  |- R
    |- separateCSV.R
    |- visualizeDiff.R
    |- runSexDisaggregate.R
  |- vignettes
    |- Introduction_sexDisaggregate.Rmd
    |- example_barplot.png
    |- example_densityplot.png
    |- shiny_example.png
  |- tests
    |- testthat.R
    |- testthat
      |- test-separateCSV.R
      |- test-visualizeDiff.R

Quick Tutorial

Step 1. Separate example dataset

exampleDataPath <- system.file("extdata", "example_data.csv", package = "sexDisaggregate")
dataList <- sexDisaggregate::separateCSV(filepath = exampleDataPath, sexTag = "Sex", femaleTag = "F", maleTag = "M")
dataList

Step 2.1: Bar plot approach

plots1 <- visualizeDiff(dataList = dataList, yTag = "Asthma", visMethod = "Bar")
plots1
BarPlot

Step 2.2: Density plot approach

plots2 <- visualizeDiff(dataList = dataList, yTag = "Sodium Intake (mg)", visMethod = "Density")
plots2
DensityPlot

About

R Package to Obtain and Analyze Sex-disaggregated Datasets

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages