Quick start to using to shinycsv

This package has the code for a shiny application that allows you to interactively explore a table. The application allows you to subset or sort your data in different ways, explore one variable at a time, or make two-way plots. It also shows you the code to reproduce the figures and can handle many different types of tables thanks to (Neuwirth, 2022). The app also lets you choose which color to use in your plots.

You can view this shiny app deployed at libd.shinyapps.io/shinycsv. If you are interested in the showcase mode, then check out libd.shinyapps.io/shinycsv-showcase.

Basics

Install shinycsv

R is an open-source statistical environment which can be easily modified to enhance its functionality via packages. shinycsv is a R package available via GitHub. R can be installed on any operating system from CRAN after which you can install shinycsv by using the following commands in your R session:

## If needed:
# install.packages('devtools')

library("devtools")
install_github("LieberInstitute/shinycsv")

How to use

To use this package, simply run:

shinycsv::explore()

The above command will open a shiny application where you can either upload a CSV file that has the variable names in the first column, a Rdata file created with the save() function that has a single data.frame object stored in it, an Excel file with a table in the first sheet, or many other files as described at the rio vignette. Using a Rdata file allows you to have stronger control regarding the variable types (factor, date, etc) for each column of your table.

Asking for help

As package developers, we try to explain clearly how to use our packages and in which order to use the functions. But R has a steep learning curve so it is critical to learn where to ask for help. For shinycsv please post issues in GitHub. However, please note that if you want to receive help you should adhere to the posting guidelines. It is particularly critical that you provide a small reproducible example and your session information so package developers can track down the source of the error.

Citing shinycsv

We hope that shinycsv will be useful for your research. Please use the following information to cite the package and the overall approach. Thank you!

## Citation info
citation("shinycsv")
## To cite package 'shinycsv' in publications use:
## 
##   Collado-Torres L, Semick S, Jaffe AE (2020). _shinycsv: Explore a
##   table interactively in a shiny application_. R package version
##   0.99.9, <https://github.com/LieberInstitute/shinycsv>.
## 
## A BibTeX entry for LaTeX users is
## 
##   @Manual{,
##     title = {shinycsv: Explore a table interactively in a shiny application},
##     author = {Leonardo Collado-Torres and Stephen Semick and Andrew E. Jaffe},
##     year = {2020},
##     note = {R package version 0.99.9},
##     url = {https://github.com/LieberInstitute/shinycsv},
##   }

Reproducibility

The shinycsv package (Wickham, 2011) was made possible thanks to:

Code for creating the vignette

## Create the vignette
library("rmarkdown")
system.time(render("shinycsv-quickstart.Rmd", "BiocStyle::html_document"))

## Extract the R code
library("knitr")
knit("shinycsv-quickstart.Rmd", tangle = TRUE)
## Clean up
file.remove("quickstartRef.bib")
## [1] TRUE

Date the vignette was generated.

## [1] "2023-05-07 07:21:17 UTC"

Wallclock time spent generating the vignette.

## Time difference of 1.041 secs

R session information.

## Loading required package: usethis
## ─ Session info ───────────────────────────────────────────────────────────────────────────────────────────────────────
##  setting  value
##  version  R version 4.3.0 (2023-04-21)
##  os       Ubuntu 22.04.2 LTS
##  system   x86_64, linux-gnu
##  ui       X11
##  language en
##  collate  en_US.UTF-8
##  ctype    en_US.UTF-8
##  tz       UTC
##  date     2023-05-07
##  pandoc   2.19.2 @ /usr/local/bin/ (via rmarkdown)
## 
## ─ Packages ───────────────────────────────────────────────────────────────────────────────────────────────────────────
##  package       * version date (UTC) lib source
##  backports       1.4.1   2021-12-13 [1] CRAN (R 4.3.0)
##  bibtex          0.5.1   2023-01-26 [1] RSPM (R 4.3.0)
##  BiocManager     1.30.20 2023-02-24 [2] CRAN (R 4.3.0)
##  BiocStyle     * 2.28.0  2023-04-25 [1] Bioconductor
##  bookdown        0.33    2023-03-06 [1] RSPM (R 4.3.0)
##  bslib           0.4.2   2022-12-16 [2] RSPM (R 4.3.0)
##  cachem          1.0.8   2023-05-01 [2] RSPM (R 4.3.0)
##  callr           3.7.3   2022-11-02 [2] RSPM (R 4.3.0)
##  cli             3.6.1   2023-03-23 [2] RSPM (R 4.3.0)
##  crayon          1.5.2   2022-09-29 [2] RSPM (R 4.3.0)
##  desc            1.4.2   2022-09-08 [2] RSPM (R 4.3.0)
##  devtools      * 2.4.5   2022-10-11 [2] RSPM (R 4.3.0)
##  digest          0.6.31  2022-12-11 [2] RSPM (R 4.3.0)
##  ellipsis        0.3.2   2021-04-29 [2] RSPM (R 4.3.0)
##  evaluate        0.20    2023-01-17 [2] RSPM (R 4.3.0)
##  fastmap         1.1.1   2023-02-24 [2] RSPM (R 4.3.0)
##  fs              1.6.2   2023-04-25 [2] RSPM (R 4.3.0)
##  generics        0.1.3   2022-07-05 [1] CRAN (R 4.3.0)
##  glue            1.6.2   2022-02-24 [2] RSPM (R 4.3.0)
##  htmltools       0.5.5   2023-03-23 [2] RSPM (R 4.3.0)
##  htmlwidgets     1.6.2   2023-03-17 [2] RSPM (R 4.3.0)
##  httpuv          1.6.9   2023-02-14 [2] RSPM (R 4.3.0)
##  httr            1.4.5   2023-02-24 [2] RSPM (R 4.3.0)
##  jquerylib       0.1.4   2021-04-26 [2] RSPM (R 4.3.0)
##  jsonlite        1.8.4   2022-12-06 [2] RSPM (R 4.3.0)
##  knitcitations * 1.0.12  2021-01-10 [1] RSPM (R 4.3.0)
##  knitr           1.42    2023-01-25 [2] RSPM (R 4.3.0)
##  later           1.3.1   2023-05-02 [2] RSPM (R 4.3.0)
##  lifecycle       1.0.3   2022-10-07 [2] RSPM (R 4.3.0)
##  lubridate       1.9.2   2023-02-10 [1] RSPM (R 4.3.0)
##  magrittr        2.0.3   2022-03-30 [2] RSPM (R 4.3.0)
##  memoise         2.0.1   2021-11-26 [2] RSPM (R 4.3.0)
##  mime            0.12    2021-09-28 [2] RSPM (R 4.3.0)
##  miniUI          0.1.1.1 2018-05-18 [2] RSPM (R 4.3.0)
##  pkgbuild        1.4.0   2022-11-27 [2] RSPM (R 4.3.0)
##  pkgdown         2.0.7   2022-12-14 [2] RSPM (R 4.3.0)
##  pkgload         1.3.2   2022-11-16 [2] RSPM (R 4.3.0)
##  plyr            1.8.8   2022-11-11 [1] CRAN (R 4.3.0)
##  prettyunits     1.1.1   2020-01-24 [2] RSPM (R 4.3.0)
##  processx        3.8.1   2023-04-18 [2] RSPM (R 4.3.0)
##  profvis         0.3.8   2023-05-02 [2] RSPM (R 4.3.0)
##  promises        1.2.0.1 2021-02-11 [2] RSPM (R 4.3.0)
##  ps              1.7.5   2023-04-18 [2] RSPM (R 4.3.0)
##  purrr           1.0.1   2023-01-10 [2] RSPM (R 4.3.0)
##  R6              2.5.1   2021-08-19 [2] RSPM (R 4.3.0)
##  ragg            1.2.5   2023-01-12 [2] RSPM (R 4.3.0)
##  Rcpp            1.0.10  2023-01-22 [2] RSPM (R 4.3.0)
##  RefManageR      1.4.0   2022-09-30 [1] CRAN (R 4.3.0)
##  remotes         2.4.2   2021-11-30 [1] RSPM (R 4.3.0)
##  rlang           1.1.1   2023-04-28 [2] RSPM (R 4.3.0)
##  rmarkdown       2.21    2023-03-26 [2] RSPM (R 4.3.0)
##  rprojroot       2.0.3   2022-04-02 [2] RSPM (R 4.3.0)
##  sass            0.4.6   2023-05-03 [2] RSPM (R 4.3.0)
##  sessioninfo     1.2.2   2021-12-06 [2] RSPM (R 4.3.0)
##  shiny           1.7.4   2022-12-15 [2] RSPM (R 4.3.0)
##  stringi         1.7.12  2023-01-11 [2] RSPM (R 4.3.0)
##  stringr         1.5.0   2022-12-02 [2] RSPM (R 4.3.0)
##  systemfonts     1.0.4   2022-02-11 [2] RSPM (R 4.3.0)
##  textshaping     0.3.6   2021-10-13 [2] RSPM (R 4.3.0)
##  timechange      0.2.0   2023-01-11 [1] RSPM (R 4.3.0)
##  urlchecker      1.0.1   2021-11-30 [2] RSPM (R 4.3.0)
##  usethis       * 2.1.6   2022-05-25 [2] RSPM (R 4.3.0)
##  vctrs           0.6.2   2023-04-19 [2] RSPM (R 4.3.0)
##  xfun            0.39    2023-04-20 [2] RSPM (R 4.3.0)
##  xml2            1.3.4   2023-04-27 [2] RSPM (R 4.3.0)
##  xtable          1.8-4   2019-04-21 [2] RSPM (R 4.3.0)
##  yaml            2.3.7   2023-01-23 [2] RSPM (R 4.3.0)
## 
##  [1] /__w/_temp/Library
##  [2] /usr/local/lib/R/site-library
##  [3] /usr/local/lib/R/library
## 
## ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

Bibliography

This vignette was generated using BiocStyle (R Core Team, 2023) with knitr (Chang, Cheng, Allaire, Sievert et al., 2022) and rmarkdown (Oleś, 2023) running behind the scenes.

Citations made with knitcitations (Chan, Chan, Leeper, and Becker, 2021).

[1] J. Allaire, Y. Xie, C. Dervieux, J. McPherson, et al. rmarkdown: Dynamic Documents for R. R package version 2.21. 2023. https://github.com/rstudio/rmarkdown.

[2] C. Boettiger. knitcitations: Citations for ‘Knitr’ Markdown Files. R package version 1.0.12. 2021. https://github.com/cboettig/knitcitations.

[3] C. Chan, G. C. Chan, T. J. Leeper, and J. Becker. rio: A Swiss-army knife for data file I/O. R package version 0.5.29. 2021.

[4] W. Chang, J. Cheng, J. Allaire, C. Sievert, et al. shiny: Web Application Framework for R. R package version 1.7.4. 2022. https://shiny.rstudio.com/.

[5] L. Collado-Torres, S. Semick, and A. E. Jaffe. shinycsv: Explore a table interactively in a shiny application. R package version 0.99.9. 2020. https://github.com/LieberInstitute/shinycsv.

[6] D. Meyer, A. Zeileis, and K. Hornik. “The Strucplot Framework: Visualizing Multi-Way Contingency Tables with vcd”. In: Journal of Statistical Software 17.3 (2006), pp. 1-48. DOI: 10.18637/jss.v017.i03.

[7] D. Meyer, A. Zeileis, and K. Hornik. vcd: Visualizing Categorical Data. R package version 1.4-11. 2023.

[8] E. Neuwirth. RColorBrewer: ColorBrewer Palettes. R package version 1.1-3. 2022. https://CRAN.R-project.org/package=RColorBrewer.

[9] A. Oleś. BiocStyle: Standard styles for vignettes and other Bioconductor documents. R package version 2.28.0. 2023. DOI: 10.18129/B9.bioc.BiocStyle. https://bioconductor.org/packages/BiocStyle.

[10] R Core Team. R: A Language and Environment for Statistical Computing. R Foundation for Statistical Computing. Vienna, Austria, 2023. https://www.R-project.org/.

[11] H. Wickham. “testthat: Get Started with Testing”. In: The R Journal 3 (2011), pp. 5-10. https://journal.r-project.org/archive/2011-1/RJournal_2011-1_Wickham.pdf.

[12] H. Wickham and J. Bryan. readxl: Read Excel Files. https://readxl.tidyverse.org, https://github.com/tidyverse/readxl. 2023.

[13] H. Wickham, J. Hester, W. Chang, and J. Bryan. devtools: Tools to Make Developing R Packages Easier. https://devtools.r-lib.org/, https://github.com/r-lib/devtools. 2022.