# Define simulated data
set.seed(123)
N_obs<-100
N_vars<-50
data<-matrix(rnorm(N_obs*N_vars), N_obs, N_vars)
sim_data<-data.frame(data,Y=rbinom(N_obs,1,0.5))
# Execute compareGroups
res<-compareGroups(Y~.,data=sim_data)
res
# update p values
res_adjusted<-padjustCompareGroups(res)
res_adjusted
# update p values using FDR method
res_adjusted<-padjustCompareGroups(res, method ="fdr")
res_adjusted
Run the code above in your browser using DataLab