Skip to content

Commit

Permalink
fix documentation
Browse files Browse the repository at this point in the history
- remove use of square brackets as this now gets interpreted as markdown
- generate filter_by_name documentation from object, like we do for all other objects
  • Loading branch information
grlloyd committed Jul 6, 2023
1 parent 32654e9 commit d0d045e
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 31 deletions.
24 changes: 8 additions & 16 deletions R/filter_by_name_class.R
Original file line number Diff line number Diff line change
@@ -1,22 +1,8 @@
#' Filter by name
#'
#' A filter to subsample a DatasetExperiment object based on sample or feature name,
#' id, row/column index or using a vector of TRUE/FALSE.
#'
#' @param mode "include" or ["exclude"] to subsample a DatasetExperiment by including or
#' excluding samples/features based on the provided labels
#' @param dimension ["sample"] or "variable" to filter by sample or feature
#' labels
#' @param names the sample/feature identifiers to filter by. Can provide column
#' names, column indices or logical.
#'
#' @eval get_description('filter_by_name')
#' @examples
#' D = MTBLS79_DatasetExperiment()
#' M = filter_by_name(mode='exclude',dimension='variable',names=c(1,2,3))
#' M = model_apply(M,D)
#'
#' @param ... additional slots and values passed to struct_class
#' @return struct object
#' @export filter_by_name
filter_by_name = function(mode='exclude',dimension='sample',names,...) {
out=struct::new_struct('filter_by_name',
Expand All @@ -36,7 +22,13 @@ filter_by_name = function(mode='exclude',dimension='sample',names,...) {
names='entity',
filtered='DatasetExperiment'
),
prototype=list(type = 'filter',
prototype=list(
name = 'Filter by name',
description = paste0(
'Filter samples/variables by row/column name, index or ',
'logicals.'),

type = 'filter',
predicted = 'filtered',
.params=c('mode','dimension','names'),
.outputs=c('filtered'),
Expand Down
4 changes: 2 additions & 2 deletions R/fold_change_class.R
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,12 @@ fold_change = function(
'transformed space before being transformed back to the ',
'original space.'),
"median" = paste0('The group medians and the method described ',
'by Price and Bonett[1] is used to ',
'by Price and Bonett is used to ',
'estimate confidence intervals. For paired data standard ',
'error of the median is used to estimate confidence ',
'intervals from the median fold change of all pairs.'),
"mean" = paste0('The group means and the method described by ',
'Price and Bonnet[1] is used to estimate confidence ',
'Price and Bonnet is used to estimate confidence ',
'intervals. For paired data standard error of the mean is ',
'used to estimate confidence intervals from the mean ',
'fold change of all pairs.')
Expand Down
20 changes: 9 additions & 11 deletions man/filter_by_name.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/fold_change.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/fold_change_int.Rd

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

0 comments on commit d0d045e

Please sign in to comment.