minpRows | R Documentation |
find the rows of a data frame with the minimum pvalue, best used in a print or summary function to summarize a group of test statistics.
minpRows(obj, colnames=NULL, rowname=NULL, col.indx=ncol(obj))
obj |
a data frame for a group of statistical tests, with pvalues |
colnames |
new names to give to columns |
rowname |
new names to give the row(s). If multiple rows contain the minimum pvalue, rowname is assigned to each of them, appending a digit at the end (1, 2, etc). |
col.indx |
the index of the columns that contains the pvalue, default is the last column of obj |
a subset of the obj data.frame rows
## create a data frame of chi-square(1) tests tests <- data.frame(pos=1:3, chitest=c(3,4,2), df=rep(1,3), pval=1-pchisq(c(3,4,2), df=1)) # find the rows of the best tests best.tests <- minpRows(tests, colnames=c("position", "chi.test", "df","pvalue"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.