Skip to content

3. Using Other Packages

Gram edited this page Jul 21, 2025 · 3 revisions

Non-Required Installation

There are two types of packages we utilize in our code. Packages that do not need to be installed and ones that do. For packages some packages, instead of installing them, you can run select functions without directly installing the package by writing:

utils::combn

"Utils" is the name of the package and "combn" is the name of the function from the utils package. For these functions, since writing them multiple times can be intrusive, we sometimes make use of masking:

combinations <- utils::combn
example <- combinations(names(pathways.list), 2)

This creates a copy of the combn function under the name combinations, which can be used for the rest of the code.

Required Installation

We also make use of Bioconductor packages (managed through BiocManager in the readme), an open source, biology themed package distributor. It is not possible to call functions from bioconductor packages indirectly, as described above. Instead, the packages must be installed using the following command:

if (!require("BiocManager", quietly = TRUE)) install.packages("BiocManager")
BiocManager::install("name")


Note that we still write Bioconductor packages using double colons (name::fun) in order to maintain consistency and legibility. If you add a function from a package, it would be good to do the same practice.

Clone this wiki locally