@@ -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 )
0 commit comments