Note: I still consider FeatureTable to be in the pre-release stage. The code itself is well tested and I use it in my own research, but the API has not stabalized and is still subject to breaking changes when I cut a new release.
The simplest was is probably by using the remotes
package:
remotes::install_github(
repo = "mooreryan/featuretable",
build_vignettes = TRUE, build = TRUE, force = TRUE, upgrade = "never",
# This will ensure that all suggested dependencies are installed as well.
dependencies = TRUE
)
Note: you can install a specific tag or relase by replacing this "mooreryan/featuretable"
with something like this "mooreryan/featuretable@0.0.11"
. (That would install tag 0.0.11.)
Alternatively, you could procure the code, and install with devtools
. To obtain the code, either:
Then install with devtools. (Ensure that you are running this from the root of the project's source directory.)
devtools::install(
build_vignettes = TRUE, build = TRUE, force = TRUE, upgrade = "never",
# This will ensure that all suggested dependencies are installed as well.
dependencies = TRUE
)
Here is some info about the dependencies. Note that if you used one of the code snippets above, all the optional dependencies will be installed as well.
These packages must be installed to use featuretable
.
R6
rlang
ggplot2
, ggrepel
, and biplotr
.zCompositions
.phyloseq
objects, then you need to install phyloseq
.knitr
and rmarkdown
. Also, some of the vignettes use magrittr
to keep things clean.testthat
.vdiffr
.covr
.dplyr
, tibble
, and tidyr
.hedgehog
package.FeatureTable
comes with some detailed vignettes describing its usage. After installing, you can view them with the following command:
browseVignettes("featuretable")
Additionally, each function has a lot of info in the help section. You can run ?featuretable
to get an overview of everything. Click on the links in there to get to individual function docs. You can also access function docs with the ?
, e.g., ?keep_samples
.
R CMD CHECK
, which includes unit tests, are run via GitHub CI for the following versions:
So as long as that is passing (see the badge at the top of the README), then you can be (pretty) sure the package works with both R v3 and v4.
Notes:
data.frame
or as.data.frame
is called in the FeatureTable
code and tests , stringsAsFactors = TRUE
is passed in as an argument.
data.frame
s that don't have their strings as factors, since FeatureTable
will convert all strings to factors, but I should probably add tests for this.as.data.frame.FeatureTable
does not have a stringsAsFactors
parameter. This shouldn't be a problem as string-esque data is not allowed in the data
field anyway.Notes for working on the code.
.rda
files in data
, using the scripts in data-raw
.
justfile
for this.Just go and install just. Then use the recipes in the justfile
.
The default branch is now main
, and the master
branch no longer exists.
If you have a local clone using master
as the default branch, you can update it by running the following commands.
git branch -m master main
git fetch origin
git branch -u origin/main main
git remote set-head origin -a
Optionally, run the following command to remove tracking references to the old branch name.
git remote prune origin