Permalink
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/make_prop_frame.Rd
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
29 lines (26 sloc)
1.47 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/z_old_statistic.R | |
\name{make_prop_frame} | |
\alias{make_prop_frame} | |
\title{Make Proportion Table} | |
\usage{ | |
make_prop_frame(df_list, factor_one, factor_two, limit = NULL) | |
} | |
\arguments{ | |
\item{df_list}{A nested list of meta data a single data frame} | |
\item{factor_one}{First grouping factor for function \link{count_column}} | |
\item{factor_two}{Second grouping factor for function \link{count_column}} | |
\item{limit}{Integer or numeric - Range of factor levels or minimum count of factor level| e.g. 1:3 or 50} | |
} | |
\value{ | |
Returns a data frame containing all pvalues of the proportion test of all genes. | |
} | |
\description{ | |
This function creates a proportion table of two columns in a data frame. | |
} | |
\examples{ | |
df_one <- data.frame(case_id = c(1,2,3,4,5,6), group = c("one","one","two","one","two","three"), primary_diagnosis = c("Squamous cell carcinoma, NOS", "Adenocarcinoma, NOS", "Adenocarcinoma with mixed subtypes", "Adenocarcinoma, NOS", "Adenocarcinoma, NOS", "Squamous cell carcinoma, NOS")) | |
df_two <- data.frame(case_id = c(1,2,3,4,5,6), group = c("one","one","two","one","two","three"), primary_diagnosis = c("Squamous cell carcinoma, NOS", "Squamous cell carcinoma, NOS", "Adenocarcinoma with mixed subtypes", "Squamous cell carcinoma, NOS", "Adenocarcinoma, NOS", "Squamous cell carcinoma, NOS")) | |
df_list <- list(df_one, df_two) | |
propDiagnosis <- make_prop_frame(df_list, factor_one = "group", factor_two = "primary_diagnosis") | |
} |