Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
mmRmeta/man/counts.per.group.Rd
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
28 lines (26 sloc)
1.14 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% Generated by roxygen2: do not edit by hand | |
% Please edit documentation in R/counts.per.group.R | |
\name{counts.per.group} | |
\alias{counts.per.group} | |
\title{Group by and summarize counts} | |
\usage{ | |
counts.per.group(list_df, first_grouping = "case_id", | |
second_grouping = "group") | |
} | |
\arguments{ | |
\item{list_df}{Either a list of data frames or a single data frame} | |
\item{first_grouping}{Character - first grouping variable | Default "case_id"} | |
\item{second_grouping}{Character - second grouping variable | Default "group""} | |
} | |
\value{ | |
Returns a data frame | |
} | |
\description{ | |
This functions groups by 2 variables/columns with the counts of the combination. It accepts a list of data frames or a single data frame. When passing a single data frame this function will simply return a data frame with the counts. When using a list as input one might wants to know how often a patient(case_id) | |
appears in a group. If youre using a single data frame you need to change the grouping variables. Using ".id" as first_grouping and lists the counts of groups for the genes. | |
} | |
\examples{ | |
Using a Data Frame | |
df <- data.frame() | |
df_counts <- counts.per.group(df, "firstColumn", "secondColumn") | |
} |