Generate a Table with P-values from a T-test
gentab_P.t.test.Rd
Given a dataframe and a set of numerical variables of that dataframe, it performs t-test to each desired variable and creates a new table with the p-values.
Usage
gentab_P.t.test(
df,
v,
f,
paired = FALSE,
FDR = FALSE,
cutPval = FALSE,
groupdiff = TRUE,
pcutoff = 0.05,
filter_sign = FALSE
)
Arguments
- df
a dataframe.
- v
a character vector. Each element must correspond to a column name of the df, each of which must contain numeric values. Moreover, missing values are not allowed (if any, consider before replacing them using the function transf_data of the present package).
- f
character vector of length 1. Name of the column of df containing the factor variable (that must have exactly 2 levels) considered for performing the t-tests.
- paired
logical. If FALSE it performs non-paired t-tests. If TRUE it performs paired t-tests.
- FDR
logical. If TRUE, after performing the t-tests, it also correct p-values across the different variables with a false discovery rate multiple comparison correction (method "fdr" of the function p.adjust).
- cutPval
logical. If TRUE, it cut the p-values using the cutP function of the present package.
- groupdiff
logical. Do you also what to add an additional column indicating which group is higher?
- pcutoff
a numeric of length 1, must be between 0 and 1. If groupdiff is TRUE, the difference between groups will be reported only if the p-values is below the cut-off reported here.
- filter_sign
logical. If TRUE, the table will be filtered and only the p-values lower than the value specified in pcutoff will be considered.