Basics

Install sum776

R is an open-source statistical environment which can be easily modified to enhance its functionality via packages. sum776 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 sum776 by using the following commands in your R session:

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

BiocManager::install("sum776")

## 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 sum776 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 sum776

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

## Citation info
citation("sum776")
#> To cite package 'sum776' in publications use:
#> 
#>   lcolladotor (2023). _sum766_. doi:10.18129/B9.bioc.sum776
#>   <https://doi.org/10.18129/B9.bioc.sum776>,
#>   https://github.com/lcolladotor/sum776/sum776 - R package version
#>   0.99.0, <http://www.bioconductor.org/packages/sum776>.
#> 
#>   lcolladotor (2023). "sum776." _bioRxiv_. doi:10.1101/TODO
#>   <https://doi.org/10.1101/TODO>,
#>   <https://www.biorxiv.org/content/10.1101/TODO>.
#> 
#> To see these entries in BibTeX format, use 'print(<citation>,
#> bibtex=TRUE)', 'toBibtex(.)', or set
#> 'options(citation.bibtex.max=999)'.

Quick start to using sum776

sum776 (lcolladotor, 2023) is an example package that we made for https://lcolladotor.github.io/jhustatcomputing2023/posts/17-loop-functions/. It defines a function that does the element-wise sum of two vectors of the same length.

library("sum776")
## basic example code

x <- 1:10
y <- rev(x)

## Compute the sum of x + y
my_sum(x, y)
#>  [1] 11 11 11 11 11 11 11 11 11 11

Reproducibility

The sum776 package (lcolladotor, 2023) was made possible thanks to:

  • R (R Core Team, 2023)
  • BiocStyle (Oleś, 2023)
  • knitr (Xie, 2023)
  • RefManageR (McLean, 2017)
  • rmarkdown (Allaire, Xie, Dervieux, McPherson, Luraschi, Ushey, Atkins, Wickham, Cheng, Chang, and Iannone, 2023)
  • sessioninfo (Wickham, Chang, Flight, Müller, and Hester, 2021)
  • testthat (Wickham, 2011)

This package was developed using biocthis.

Code for creating the vignette

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

## Extract the R code
library("knitr")
knit("sum776.Rmd", tangle = TRUE)

Date the vignette was generated.

#> [1] "2023-09-25 23:33:23 UTC"

Wallclock time spent generating the vignette.

#> Time difference of 1.282 secs

R session information.

#> ─ Session info ───────────────────────────────────────────────────────────────────────────────────────────────────────
#>  setting  value
#>  version  R version 4.3.1 (2023-06-16)
#>  os       Ubuntu 22.04.3 LTS
#>  system   x86_64, linux-gnu
#>  ui       X11
#>  language en
#>  collate  en_US.UTF-8
#>  ctype    en_US.UTF-8
#>  tz       UTC
#>  date     2023-09-25
#>  pandoc   3.1.1 @ /usr/local/bin/ (via rmarkdown)
#> 
#> ─ Packages ───────────────────────────────────────────────────────────────────────────────────────────────────────────
#>  package     * version date (UTC) lib source
#>  backports     1.4.1   2021-12-13 [1] RSPM (R 4.3.0)
#>  bibtex        0.5.1   2023-01-26 [1] RSPM (R 4.3.0)
#>  BiocManager   1.30.22 2023-08-08 [2] CRAN (R 4.3.1)
#>  BiocStyle   * 2.28.1  2023-09-14 [1] Bioconductor
#>  bookdown      0.35    2023-08-09 [1] RSPM (R 4.3.0)
#>  bslib         0.5.1   2023-08-11 [2] RSPM (R 4.3.0)
#>  cachem        1.0.8   2023-05-01 [2] RSPM (R 4.3.0)
#>  cli           3.6.1   2023-03-23 [2] RSPM (R 4.3.0)
#>  desc          1.4.2   2022-09-08 [2] RSPM (R 4.3.0)
#>  digest        0.6.33  2023-07-07 [2] RSPM (R 4.3.0)
#>  evaluate      0.21    2023-05-05 [2] RSPM (R 4.3.0)
#>  fastmap       1.1.1   2023-02-24 [2] RSPM (R 4.3.0)
#>  fs            1.6.3   2023-07-20 [2] RSPM (R 4.3.0)
#>  generics      0.1.3   2022-07-05 [1] RSPM (R 4.3.0)
#>  glue          1.6.2   2022-02-24 [2] RSPM (R 4.3.0)
#>  htmltools     0.5.6   2023-08-10 [2] RSPM (R 4.3.0)
#>  httr          1.4.7   2023-08-15 [2] RSPM (R 4.3.0)
#>  jquerylib     0.1.4   2021-04-26 [2] RSPM (R 4.3.0)
#>  jsonlite      1.8.7   2023-06-29 [2] RSPM (R 4.3.0)
#>  knitr         1.44    2023-09-11 [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)
#>  pkgdown       2.0.7   2022-12-14 [2] RSPM (R 4.3.0)
#>  plyr          1.8.8   2022-11-11 [1] RSPM (R 4.3.0)
#>  purrr         1.0.2   2023-08-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.11  2023-07-06 [2] RSPM (R 4.3.0)
#>  RefManageR  * 1.4.0   2022-09-30 [1] RSPM (R 4.3.0)
#>  rlang         1.1.1   2023-04-28 [2] RSPM (R 4.3.0)
#>  rmarkdown     2.25    2023-09-18 [2] RSPM (R 4.3.0)
#>  rprojroot     2.0.3   2022-04-02 [2] RSPM (R 4.3.0)
#>  sass          0.4.7   2023-07-15 [2] RSPM (R 4.3.0)
#>  sessioninfo * 1.2.2   2021-12-06 [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)
#>  sum776      * 0.99.0  2023-09-25 [1] Bioconductor
#>  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)
#>  vctrs         0.6.3   2023-06-14 [2] RSPM (R 4.3.0)
#>  xfun          0.40    2023-08-09 [2] RSPM (R 4.3.0)
#>  xml2          1.3.5   2023-07-06 [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 (Oleś, 2023) with knitr (Xie, 2023) and rmarkdown (Allaire, Xie, Dervieux et al., 2023) running behind the scenes.

Citations made with RefManageR (McLean, 2017).

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

[2] lcolladotor. sum766. https://github.com/lcolladotor/sum776/sum776 - R package version 0.99.0. 2023. DOI: 10.18129/B9.bioc.sum776. URL: http://www.bioconductor.org/packages/sum776.

[3] M. W. McLean. “RefManageR: Import and Manage BibTeX and BibLaTeX References in R”. In: The Journal of Open Source Software (2017). DOI: 10.21105/joss.00338.

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

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

[6] 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.

[7] H. Wickham, W. Chang, R. Flight, et al. sessioninfo: R Session Information. https://github.com/r-lib/sessioninfo#readme, https://r-lib.github.io/sessioninfo/. 2021.

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