Skip to content

Commit 9133f04

Browse files
spell checking docs
1 parent 0fdd50a commit 9133f04

38 files changed

+88
-101
lines changed

R/calculations.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ calc_obs_props <- function(obj, dataset, cols = NULL, other_cols = FALSE,
7777
#' Replace low counts with zero
7878
#'
7979
#' For a given table in a \code{\link[taxa]{taxmap}} object, convert all counts
80-
#' below a minimum numer to zero. This is useful for effectivly removing
80+
#' below a minimum number to zero. This is useful for effectively removing
8181
#' "singletons", "doubletons", or other low abundance counts.
8282
#'
8383
#' @param obj A \code{\link[taxa]{taxmap}} object
@@ -88,7 +88,7 @@ calc_obs_props <- function(obj, dataset, cols = NULL, other_cols = FALSE,
8888
#' @param use_total If \code{TRUE}, the \code{min_count} applies to the total
8989
#' count for each row (e.g. OTU counts for all samples), rather than each cell
9090
#' in the table. For example \code{use_total = TRUE, min_count = 10} would
91-
#' convert all counts of any row to zero if the totol for all counts in that
91+
#' convert all counts of any row to zero if the total for all counts in that
9292
#' row was less than 10.
9393
#' @param cols The names/indexes of columns in \code{dataset} to use. By
9494
#' default, all numeric columns are used. Takes one of the following inputs:
@@ -294,7 +294,7 @@ rarefy_obs <- function(obj, dataset, sample_size = NULL, cols = NULL,
294294
#' order and length as \code{cols}.
295295
#' @param func The function to apply for each comparison. For each row in
296296
#' \code{dataset}, for each combination of groups, this function will
297-
#' recieve the data for each treatment, passed a two character vecotors.
297+
#' receive the data for each treatment, passed a two character vectors.
298298
#' Therefore the function must take at least 2 arguments corresponding to the
299299
#' two groups compared. The function should return a vector or list or
300300
#' results of a fixed length. If named, the names will be used in the output.

R/heat_tree--internal.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#' Bounding box coords for labels
22
#'
3-
#' Given a position, size, rotation, and justification of a lable, calculate the bounding box coordinates
3+
#' Given a position, size, rotation, and justification of a label, calculate the bounding box coordinates
44
#'
55
#' @param x Horizontal position of center of text grob
66
#' @param y Vertical position of center of text grob
@@ -195,7 +195,7 @@ check_element_length <- function(args) {
195195

196196
#' Transformation functions
197197
#'
198-
#' Functions used by plotting funtions to transform data.
198+
#' Functions used by plotting functions to transform data.
199199
#' Calling the function with no parameters returns available function names.
200200
#' Calling with just the function name returns the transformation function
201201
#'

R/heat_tree--shape_generators.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#===================================================================================================
2-
#' Makes coordinates for a regualr polygon
2+
#' Makes coordinates for a regular polygon
33
#'
44
#' Generates an n x 2 matrix containing x and y coordinates between 1 and 0 for the points of a
55
#' regular polygon.

R/heat_tree--vertex_size.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ inter_circle_gap <- function(x, y, r) {
5858
#'
5959
#' Finds optimal max and min value using an optimality criterion.
6060
#'
61-
#' @param max_range (\code{numeric} of length 2) The min and max boundries to the search space for
61+
#' @param max_range (\code{numeric} of length 2) The min and max boundaries to the search space for
6262
#' the optimal maximum value.
63-
#' @param min_range (\code{numeric} of length 2) The min and max boundries to the search space for
63+
#' @param min_range (\code{numeric} of length 2) The min and max boundaries to the search space for
6464
#' the optimal minimum value.
6565
#' @param resolution (\code{numeric} of length 2) The number of increments in each dimension.
6666
#' @param opt_crit (\code{function}) A function that takes two arguments, the max and min, and

R/heat_tree.R

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ heat_tree.Taxmap <- function(.input, ...) {
4444
#' Sizes and colors of nodes, edges, labels, and individual trees can be displayed relative to
4545
#' numbers (e.g. taxon statistics, such as abundance).
4646
#' The displayed range of colors and sizes can be explicitly defined or automatically generated.
47-
#' Various transforamtions can be applied to numbers sizes/colors are mapped to.
47+
#' Various transformations can be applied to numbers sizes/colors are mapped to.
4848
#' Several types of tree layout algorithms from \code{\link{igraph}} can be used.
4949
#'
5050
#' @param taxon_id The unique ids of taxa.
@@ -200,9 +200,9 @@ heat_tree.Taxmap <- function(.input, ...) {
200200
#' Default: Do not save plot.
201201
#'
202202
#' @param aspect_ratio The aspect_ratio of the plot.
203-
#' @param repel_labels If \code{TRUE} (Defualt), use the ggrepel pacakge to spread out labels.
204-
#' @param repel_force The force of which overlapping labels will be repeled from eachother.
205-
#' @param repel_iter The number of iterations used whe repeling labels
203+
#' @param repel_labels If \code{TRUE} (Defualt), use the ggrepel package to spread out labels.
204+
#' @param repel_force The force of which overlapping labels will be repelled from eachother.
205+
#' @param repel_iter The number of iterations used when repelling labels
206206
#' @param verbose If \code{TRUE} print progress reports as the function runs.
207207
#'
208208
#' @param ... (other named arguments)
@@ -214,7 +214,7 @@ heat_tree.Taxmap <- function(.input, ...) {
214214
#'
215215
#' The size of nodes, edges, labels, and trees can be mapped to arbitrary numbers.
216216
#' This is useful for displaying statistics for taxa, such as abundance.
217-
#' Only the relative size of numbers is used, not the values themeselves.
217+
#' Only the relative size of numbers is used, not the values themselves.
218218
#' They can be transformed to make the mapping non-linear using the transformation options.
219219
#' The range of actual sizes displayed on the graph can be set using the range options.
220220
#'
@@ -225,7 +225,7 @@ heat_tree.Taxmap <- function(.input, ...) {
225225
#'
226226
#' The colors of nodes, edges, labels, and trees can be mapped to arbitrary numbers.
227227
#' This is useful for highlighting groups of taxa.
228-
#' Only the relative size of numbers is used, not the values themeselves.
228+
#' Only the relative size of numbers is used, not the values themselves.
229229
#' They can be transformed to make the mapping non-linear using the transformation options.
230230
#' The range of actual colors displayed on the graph can be set using the range options.
231231
#'
@@ -307,7 +307,7 @@ heat_tree.Taxmap <- function(.input, ...) {
307307
#'
308308
#' This package includes code from the R package ggrepel to handle label overlap
309309
#' avoidance with permission from the author of ggrepel Kamil Slowikowski. We
310-
#' included the code instead of depending on ggrepel becacuse we are using
310+
#' included the code instead of depending on ggrepel because we are using
311311
#' internal functions to ggrepel that might change in the future. We thank Kamil
312312
#' Slowikowski for letting us use his code and would like to acknowledge his
313313
#' implementation of the label overlap avoidance used in metacoder.
@@ -388,7 +388,7 @@ heat_tree.Taxmap <- function(.input, ...) {
388388
#' node_size_trans = "log10 area")
389389
#'
390390
#' # Setting the interval displayed:
391-
#' # By defualt, the whole range of the statistic provided will be displayed.
391+
#' # By default, the whole range of the statistic provided will be displayed.
392392
#' # You can set what range of values are displayed using options ending in `_interval`.
393393
#' heat_tree(x, node_label = taxon_names, node_size = n_obs, node_color = n_obs,
394394
#' node_size_interval = c(10, 100))
@@ -742,10 +742,10 @@ heat_tree.default <- function(taxon_id, supertaxon_id,
742742
#|
743743
#| #### Infer edge size range -------------------------------------------------------------------
744744
#|
745-
infer_size_range <- function(specified_range, reference_range, defualt_scale) {
745+
infer_size_range <- function(specified_range, reference_range, default_scale) {
746746
result <- specified_range * square_side_length
747747
if (is.na(result[1]) && is.na(result[2])) { # If the user has not set range
748-
result <- reference_range * defualt_scale
748+
result <- reference_range * default_scale
749749
} else if (is.na(result[1])) { # If the user has set a maximum but not a minimum
750750
result[1] <- result[2] * reference_range[1] / reference_range[2]
751751
} else if (is.na(result[2])) { # If the user has set a minimum but not a maximum
@@ -754,7 +754,7 @@ heat_tree.default <- function(taxon_id, supertaxon_id,
754754
return(result)
755755
}
756756

757-
esr_plot <- infer_size_range(edge_size_range, vsr_plot, defualt_scale = 0.5)
757+
esr_plot <- infer_size_range(edge_size_range, vsr_plot, default_scale = 0.5)
758758
data$es_plot <- rescale(data$es_t, to = esr_plot, from = edge_size_interval_trans)
759759
#|
760760
#| #### Infer tree size range -------------------------------------------------------------------
@@ -777,9 +777,9 @@ heat_tree.default <- function(taxon_id, supertaxon_id,
777777
data$tls_user <- sqrt(data$tree_area)
778778
data$tls_trans <- apply_trans("tls_user")
779779
}
780-
vlsr_plot <- infer_size_range(node_label_size_range, vsr_plot, defualt_scale = 0.8)
781-
elsr_plot <- infer_size_range(edge_label_size_range, esr_plot, defualt_scale = 0.8)
782-
tlsr_plot <- infer_size_range(tree_label_size_range, tsr_plot, defualt_scale = 0.1)
780+
vlsr_plot <- infer_size_range(node_label_size_range, vsr_plot, default_scale = 0.8)
781+
elsr_plot <- infer_size_range(edge_label_size_range, esr_plot, default_scale = 0.8)
782+
tlsr_plot <- infer_size_range(tree_label_size_range, tsr_plot, default_scale = 0.1)
783783
data$vls_plot <- rescale(data$vls_trans, to = vlsr_plot)
784784
data$els_plot <- rescale(data$els_trans, to = elsr_plot)
785785
data$tls_plot <- rescale(data$tls_trans, to = tlsr_plot)

R/heat_tree_matrix.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
#' Plot a matrix of heat trees
22
#'
3-
#' Plot a matrix of heat trees for showing parwise comparisions. A larger,
3+
#' Plot a matrix of heat trees for showing parwise comparisons. A larger,
44
#' labelled tree serves as a key for the matrix of smaller unlabelled trees. The
55
#' data for this function is typically created with \code{\link{compare_groups}},
66
#'
77
#' @param obj A \code{\link[taxa]{taxmap}} object
88
#' @param dataset The name of a table in \code{obj$data} that is the output of
99
#' \code{\link{compare_groups}} or in the same format.
1010
#' @param label_small_trees If \code{TRUE} add labels to small trees as well as
11-
#' the key tree. Otherwise, only the key tree will be labled.
11+
#' the key tree. Otherwise, only the key tree will be labeled.
1212
#' @param key_size The size of the key tree relative to the whole graph. For
1313
#' example, 0.5 means half the width/height of the graph.
1414
#' @param seed That random seed used to make the graphs.

R/internal.R

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,6 @@ get_node_children <- function(graph, node) {
3939
}
4040

4141

42-
#' delete_vetices_and_children
43-
#'
44-
#' @keywords internal
45-
delete_vetices_and_children <- function(graph, nodes) {
46-
nodes <- unlist(sapply(nodes, function(x) get_node_children(graph, x)))
47-
graph <- igraph::delete.vertices(graph, nodes)
48-
return(graph)
49-
}
50-
51-
5242
#' add_alpha
5343
#'
5444
#' @keywords internal

R/metacoder-package.R

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#' \item Provide flexible functions for analyzing taxonomic and abundance data.
1313
#' }
1414
#'
15-
#' To accomplish these goals, `metacoder` leverages resources from other R packages, interfaces with
15+
#' To accomplish these goals, \code{metacoder} leverages resources from other R packages, interfaces with
1616
#' external programs, and provides novel functions where needed to allow for entire analyses within R.
1717
#'
1818
#' @section Documentation:
@@ -23,7 +23,7 @@
2323
#'
2424
#' \code{browseVignettes(package = "metacoder")}
2525
#'
26-
#' \strong{Plotting taxonomic distribution of data:}
26+
#' \strong{Plotting:}
2727
#'
2828
#' \itemize{
2929
#' \item \code{\link{heat_tree}}
@@ -73,6 +73,12 @@
7373
#' \item \code{\link{write_unite_general}}
7474
#' }
7575
#'
76+
#' \strong{Database querying:}
77+
#'
78+
#' \itemize{
79+
#' \item \code{\link{ncbi_taxon_sample}}
80+
#' }
81+
#'
7682
#' @author Zachary Foster
7783
#' @name metacoder
7884
#' @docType package

R/mothur.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#' Parse summary.seqs output
33
#'
44
#' Extract statistics from the command line output of mothur command \code{summary.seqs} and
5-
#' return the resutls in a \code{data.frame}
5+
#' return the results in a \code{data.frame}
66
#'
77
#' @param text The text output of \code{summary.seqs}
88
#' @param file The path to saved output of \code{summary.seqs}

R/parsers.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ parse_unite_general <- function(input = NULL, file = NULL, include_seqs = TRUE)
438438
#' @param include_seqs (\code{logical} of length 1) If \code{TRUE}, include
439439
#' sequences in the output object.
440440
#' @param add_species (\code{logical} of length 1) If \code{TRUE}, add the
441-
#' species information to the taxonomy. In this databse, the speceis name
441+
#' species information to the taxonomy. In this databse, the species name
442442
#' often contains other information as well.
443443
#'
444444
#' @return \code{\link{taxmap}}

0 commit comments

Comments
 (0)