Skip to content

Commit

Permalink
Add return value to all docs
Browse files Browse the repository at this point in the history
  • Loading branch information
arisp99 committed Aug 8, 2022
1 parent 18992c8 commit 4f1d7a6
Show file tree
Hide file tree
Showing 19 changed files with 71 additions and 19 deletions.
3 changes: 3 additions & 0 deletions R/chromosome-map.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
#' @param ... <[`dynamic-dots`][rlang::dyn-dots]> Additional arguments passed to
#' internal plotting functions.
#'
#' @return A [chromoMap][chromoMap::chromoMap] or
#' [karyoploteR](https://bernatgel.github.io/karyoploter_tutorial/) object.
#'
#' @seealso See the [chromoMap][chromoMap::chromoMap] and
#' [karyoploteR](https://bernatgel.github.io/karyoploter_tutorial/) packages
#' to create custom chromosome maps.
Expand Down
4 changes: 3 additions & 1 deletion R/convert.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
#' Conversion is case-insensitive, but always returns capitalized 1-letter and
#' 3-letter abbreviations in title-case.
#'
#' @param str String containing amino acids to convert.
#' @param str Character vector containing amino acids to convert.
#'
#' @return Character vector with converted amino acid abbreviations.
#'
#' @aliases convert
#' @export
Expand Down
2 changes: 2 additions & 0 deletions R/example.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
#'
#' @param path Name of file. If `NULL`, all example files will be listed.
#'
#' @return A local filepath or a list of all available files.
#'
#' @aliases example
#' @export
#' @examples
Expand Down
13 changes: 11 additions & 2 deletions R/filter.R
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,19 @@ filter_fn_factory <- function(.col, .type = c("numeric", "character")) {
#'
#' @param .data A data frame, data frame extension (e.g. a tibble), or a lazy
#' data frame (e.g. from dbplyr or dtplyr).
#' @param .value Filtering value. Data greater than or equal to the value will
#' be kept.
#' @param .value Filtering value. If a number, data greater than or equal to the
#' value will be kept. If a string, data equal to the value will be kept.
#' @inheritParams dplyr::filter
#'
#' @return
#' An object of the same type as `.data`. The output has the following
#' properties:
#'
#' * Rows are a subset of the input, but appear in the same order.
#' * Columns are not modified.
#' * The number of groups may be reduced (if `.preserve` is not `TRUE`).
#' * Data frame attributes are preserved.
#'
#' @name filter
#' @seealso [dplyr::filter()] for more complex filtering operations.
#' @examples
Expand Down
2 changes: 2 additions & 0 deletions R/mutation-frequency.R
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ mutation_frequency.ref_alt_cov_tbl <- function(data, threshold) {
#' of [mutation_frequency()].
#' @param ... Other arguments passed to specific methods.
#'
#' @return A [ggplot2][ggplot2::ggplot2-package] object.
#'
#' @export
#' @seealso [mutation_frequency()] for generating the data for plotting.
#' @examples
Expand Down
2 changes: 2 additions & 0 deletions R/mutation-prevalence.R
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ mutation_prevalence.geno_tbl <- function(data, ...) {
#' of [mutation_prevalence()].
#' @param ... Other arguments passed to specific methods.
#'
#' @return A [ggplot2][ggplot2::ggplot2-package] object.
#'
#' @export
#' @seealso [mutation_prevalence()] for generating the data for plotting.
#' @examples
Expand Down
2 changes: 2 additions & 0 deletions R/plot_coverage.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
#' @param group_by The grouping variable. The average coverage is computed for
#' each unique value of the variable.
#'
#' @return A [ggplot2][ggplot2::ggplot2-package] object.
#'
#' @export
#' @examples
#' # Read example data
Expand Down
10 changes: 4 additions & 6 deletions R/read-tbl.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#' sequenced.
#'
#' @section Useful filter functions:
#' The [dplyr::filter()] function is employed to subset the rows of the data
#' The [dplyr::filter()] function is employed to subset the rows of the data by
#' applying the expressions in `...` to the column values to determine which
#' rows should be retained.
#'
Expand Down Expand Up @@ -47,11 +47,9 @@
#' @param gene `r lifecycle::badge("deprecated")` The gene(s) to filter to.
#'
#' @return
#' A [`tibble()`][tibble::tibble-package]. The first six columns contain the
#' metadata associated with each sample and mutation. The last column contains
#' the information parsed from the table. In some cases, this may be the
#' umi_count and in other cases it may be the coverage of the associated data
#' point.
#' A [`tibble()`][tibble::tibble-package] subclass. Each function defines a
#' unique subclass to store the data. Data typically contains the sample,
#' associated metadata, and the value of interest.
#'
#' @seealso [vroom::vroom()] [dplyr::filter()]
#' @name read-tbl
Expand Down
2 changes: 2 additions & 0 deletions R/themes.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
#' @param base_line_size Base size for line elements.
#' @param base_rect_size Base size for rect elements.
#'
#' @return A [ggplot2][ggplot2::theme] theme.
#'
#' @importFrom ggplot2 %+replace%
#' @examples
#' library("ggplot2")
Expand Down
4 changes: 4 additions & 0 deletions man/chromosome-map.Rd

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

5 changes: 4 additions & 1 deletion man/convert_single.Rd

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

3 changes: 3 additions & 0 deletions man/custom_themes.Rd

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

14 changes: 12 additions & 2 deletions man/filter.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/miplicorn-package.Rd

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

3 changes: 3 additions & 0 deletions man/miplicorn_example.Rd

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

3 changes: 3 additions & 0 deletions man/plot_coverage.Rd

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

3 changes: 3 additions & 0 deletions man/plot_mutation_frequency.Rd

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

3 changes: 3 additions & 0 deletions man/plot_mutation_prevalence.Rd

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

10 changes: 4 additions & 6 deletions man/read-tbl.Rd

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

0 comments on commit 4f1d7a6

Please sign in to comment.