Basics

Install rutils

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

if (!requireNamespace("BiocManager", quietly = TRUE)) {
    install.packages("BiocManager")
}

BiocManager::install("rutils")

## Check that you have a valid Bioconductor installation
BiocManager::valid()

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 and Bioconductor have a steep learning curve so it is critical to learn where to ask for help. The blog post quoted above mentions some but we would like to highlight the Bioconductor support site as the main resource for getting help: remember to use the rutils tag and check the older posts. Other alternatives are available such as creating GitHub issues and tweeting. 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 rutils

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

## Citation info
citation("rutils")
#> 
#> RHReynolds (2022). _Common utility functions_. doi:
#> 10.5281/zenodo.6127446 (URL: https://doi.org/10.5281/zenodo.6127446),
#> https://github.com/RHReynolds/rutils - R package version 0.99.2, <URL:
#> https://github.com/RHReynolds/rutils>.
#> 
#> A BibTeX entry for LaTeX users is
#> 
#>   @Manual{,
#>     title = {Common utility functions},
#>     author = {{RHReynolds}},
#>     year = {2022},
#>     url = {https://github.com/RHReynolds/rutils},
#>     note = {https://github.com/RHReynolds/rutils - R package version 0.99.2},
#>     doi = {10.5281/zenodo.6127446},
#>   }

Quick start to using to rutils

A number of different families of functions exist in rutils, including:

Reproducibility

The rutils package (RHReynolds, 2022) was made possible thanks to:

This package was developed using biocthis.

Code for creating the vignette

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

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

Date the vignette was generated.

#> [1] "2022-03-02 14:52:10 UTC"

Wallclock time spent generating the vignette.

#> Time difference of 1.218 secs

R session information.

#> ─ Session info ───────────────────────────────────────────────────────────────────────────────────────────────────────
#>  setting  value                       
#>  version  R version 4.0.3 (2020-10-10)
#>  os       Ubuntu 20.04 LTS            
#>  system   x86_64, linux-gnu           
#>  ui       X11                         
#>  language (EN)                        
#>  collate  en_US.UTF-8                 
#>  ctype    en_US.UTF-8                 
#>  tz       Etc/UTC                     
#>  date     2022-03-02                  
#> 
#> ─ Packages ───────────────────────────────────────────────────────────────────────────────────────────────────────────
#>  package       * version date       lib source                                 
#>  assertthat      0.2.1   2019-03-21 [2] RSPM (R 4.0.3)                         
#>  BiocManager     1.30.10 2019-11-16 [1] RSPM (R 4.0.0)                         
#>  BiocStyle     * 2.18.1  2020-11-24 [1] Bioconductor                           
#>  bookdown        0.21    2020-10-13 [1] RSPM (R 4.0.2)                         
#>  cachem          1.0.4   2021-02-13 [2] RSPM (R 4.0.3)                         
#>  cli             2.3.0   2021-01-31 [2] RSPM (R 4.0.3)                         
#>  colorspace      2.0-0   2020-11-11 [1] RSPM (R 4.0.3)                         
#>  crayon          1.4.1   2021-02-08 [2] RSPM (R 4.0.3)                         
#>  desc            1.2.0   2018-05-01 [2] RSPM (R 4.0.3)                         
#>  digest          0.6.27  2020-10-24 [2] RSPM (R 4.0.3)                         
#>  dplyr           1.0.4   2021-02-02 [1] RSPM (R 4.0.3)                         
#>  ellipsis        0.3.1   2020-05-15 [2] RSPM (R 4.0.3)                         
#>  evaluate        0.14    2019-05-28 [2] RSPM (R 4.0.3)                         
#>  fastmap         1.1.0   2021-01-25 [2] RSPM (R 4.0.3)                         
#>  forcats         0.5.1   2021-01-27 [1] RSPM (R 4.0.3)                         
#>  fs              1.5.0   2020-07-31 [2] RSPM (R 4.0.3)                         
#>  generics        0.1.0   2020-10-31 [1] RSPM (R 4.0.3)                         
#>  ggplot2         3.3.3   2020-12-30 [1] RSPM (R 4.0.3)                         
#>  glue            1.4.2   2020-08-27 [2] RSPM (R 4.0.3)                         
#>  gtable          0.3.0   2019-03-25 [1] RSPM (R 4.0.3)                         
#>  htmltools       0.5.1.1 2021-01-22 [2] RSPM (R 4.0.3)                         
#>  httr            1.4.2   2020-07-20 [2] RSPM (R 4.0.3)                         
#>  jsonlite        1.7.2   2020-12-09 [2] RSPM (R 4.0.3)                         
#>  knitcitations * 1.0.12  2022-03-02 [1] Github (cboettig/knitcitations@60bf3fe)
#>  knitr           1.31    2021-01-27 [2] RSPM (R 4.0.3)                         
#>  lifecycle       1.0.0   2021-02-15 [2] RSPM (R 4.0.3)                         
#>  lubridate       1.7.9.2 2020-11-13 [1] RSPM (R 4.0.3)                         
#>  magrittr        2.0.1   2020-11-17 [2] RSPM (R 4.0.3)                         
#>  memoise         2.0.0   2021-01-26 [2] RSPM (R 4.0.3)                         
#>  munsell         0.5.0   2018-06-12 [1] RSPM (R 4.0.3)                         
#>  pillar          1.4.7   2020-11-20 [2] RSPM (R 4.0.3)                         
#>  pkgconfig       2.0.3   2019-09-22 [2] RSPM (R 4.0.3)                         
#>  pkgdown         1.6.1   2020-09-12 [1] RSPM (R 4.0.2)                         
#>  plyr            1.8.6   2020-03-03 [1] RSPM (R 4.0.3)                         
#>  purrr           0.3.4   2020-04-17 [2] RSPM (R 4.0.3)                         
#>  R6              2.5.0   2020-10-28 [2] RSPM (R 4.0.3)                         
#>  ragg            1.1.0   2021-02-15 [1] RSPM (R 4.0.3)                         
#>  Rcpp            1.0.6   2021-01-15 [2] RSPM (R 4.0.3)                         
#>  RefManageR      1.3.5   2022-03-02 [1] Github (ropensci/RefManageR@e93a63b)   
#>  rlang           0.4.10  2020-12-30 [2] RSPM (R 4.0.3)                         
#>  rmarkdown       2.6     2020-12-14 [1] RSPM (R 4.0.3)                         
#>  rprojroot       2.0.2   2020-11-15 [2] RSPM (R 4.0.3)                         
#>  rutils        * 0.99.2  2022-03-02 [1] Bioconductor                           
#>  scales          1.1.1   2020-05-11 [1] RSPM (R 4.0.3)                         
#>  sessioninfo   * 1.1.1   2018-11-05 [2] RSPM (R 4.0.3)                         
#>  stringi         1.5.3   2020-09-09 [2] RSPM (R 4.0.3)                         
#>  stringr         1.4.0   2019-02-10 [2] RSPM (R 4.0.3)                         
#>  systemfonts     1.0.1   2021-02-09 [1] RSPM (R 4.0.3)                         
#>  textshaping     0.3.0   2021-02-10 [1] RSPM (R 4.0.3)                         
#>  tibble          3.0.6   2021-01-29 [2] RSPM (R 4.0.3)                         
#>  tidyselect      1.1.0   2020-05-11 [1] RSPM (R 4.0.3)                         
#>  vctrs           0.3.6   2020-12-17 [2] RSPM (R 4.0.3)                         
#>  withr           2.4.1   2021-01-26 [2] RSPM (R 4.0.3)                         
#>  xfun            0.21    2021-02-10 [2] RSPM (R 4.0.3)                         
#>  xml2            1.3.2   2020-04-23 [2] RSPM (R 4.0.3)                         
#>  yaml            2.2.1   2020-02-01 [2] RSPM (R 4.0.3)                         
#> 
#> [1] /__w/_temp/Library
#> [2] /usr/local/lib/R/site-library
#> [3] /usr/local/lib/R/library

Bibliography

This vignette was generated using BiocStyle (Oleś, Morgan, and Huber, 2020) with knitr (Xie, 2021) and rmarkdown (Allaire, Xie, McPherson, Luraschi et al., 2020) running behind the scenes.

Citations made with knitcitations (Boettiger, 2022).

[1] J. Allaire, Y. Xie, J. McPherson, J. Luraschi, et al. rmarkdown: Dynamic Documents for R. R package version 2.6. 2020. <URL: https://github.com/rstudio/rmarkdown>.

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

[3] G. Csárdi, R. core, H. Wickham, W. Chang, et al. sessioninfo: R Session Information. R package version 1.1.1. 2018. <URL: https://github.com/r-lib/sessioninfo#readme>.

[4] A. Oleś, M. Morgan, and W. Huber. BiocStyle: Standard styles for vignettes and other Bioconductor documents. R package version 2.18.1. 2020. <URL: https://github.com/Bioconductor/BiocStyle>.

[5] R Core Team. R: A Language and Environment for Statistical Computing. R Foundation for Statistical Computing. Vienna, Austria, 2020. <URL: https://www.R-project.org/>.

[6] RHReynolds. Common utility functions. https://github.com/RHReynolds/rutils - R package version 0.99.2. 2022. DOI: 10.5281/zenodo.6127446. <URL: https://github.com/RHReynolds/rutils>.

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

[8] Y. Xie. knitr: A General-Purpose Package for Dynamic Report Generation in R. R package version 1.31. 2021. <URL: https://yihui.org/knitr/>.