R/vsg_max.R

Defines functions vsg_max

Documented in vsg_max

#'Find the highest expressed VSG
#'
#'Find the most highly expressed VSG in a designated group.
#'
#'@param df A data frame, usually containing VSGSeq results data.
#'@param  ... A set of columns to 'group_by'. These arguments are passed into
#'  dplyr::group_by function.
#'
#'@return Returns a date frame with the rows of VSGs with the maximum Percent
#'  value based on the group_by arguments.
#'@export
#'
#' @examples
#' vsg_max(results_df, mouse, tissue, day)
vsg_max <- function(df,...) {
  df %>%
    dplyr::group_by(...) %>%
    dplyr::filter(Percent == max(Percent)) %>%
    dplyr::ungroup()
}
ABeav/vsgseqtools documentation built on Jan. 26, 2024, 7:22 p.m.