Skip to content

Commit

Permalink
Fix bugs in examples
Browse files Browse the repository at this point in the history
  • Loading branch information
TheOafidian committed Oct 13, 2023
1 parent 8b08e83 commit 2908d95
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 41 deletions.
21 changes: 1 addition & 20 deletions R/adders_samples.R
Original file line number Diff line number Diff line change
Expand Up @@ -185,25 +185,6 @@ add_alpha <- function(ta) {
#' @importFrom stats hclust
#' @param ta tidytacos object.
#'
#' @examples
#' # Initiate counts matrix
#' x <- matrix(
#' c(1500, 1300, 280, 356),
#' ncol = 2
#' )
#' rownames(x) <- c("taxon1", "taxon2")
#' colnames(x) <- c("sample1", "sample2")
#'
#' # Convert to tidytacos object
#' data <- create_tidytacos(x,
#' taxa_are_columns = FALSE
#' )
#'
#' # Add total abundance
#' data <- data %>%
#' add_sample_clustered()
#'
#'
add_sample_clustered <- function(ta) {

# make relative abundance matrix
Expand Down Expand Up @@ -451,7 +432,7 @@ add_spike_ratio <- function(ta, spike_taxon) {
#'
#' # Add total abundance
#' data <- data %>%
#' cluster_samplesn_clusters = 2)
#' cluster_samples(n_clusters = 2)
#'
# Adds a variable "cluster" to the samples table
# To do: merge with add_sample_clustered somehow
Expand Down
20 changes: 0 additions & 20 deletions man/add_sample_clustered.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/cluster_samples.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2908d95

Please sign in to comment.