dewittpe / qwraps2

An updated version of qwraps with a focus on flexibility and general purpose. These functions are helpful for extracting and formatting results from R into .Rnw or .Rmd files. Additional functions for routine work such as extracting results from regression models or finding sensitivity and specificity.
http://www.peteredewitt.com/qwraps2/
GNU General Public License v3.0
37 stars 7 forks source link

Conflict with ggpubr #105

Closed teddychao closed 3 years ago

teddychao commented 3 years ago

Hi,

I am using qwraps2 for performing statistical analysis on my data and ggplot2 for visualisation. I am a little confused that _meansd seems not working when I load ggpubr. It reported that these parameters did not work

denote_sd = 'paren', digits = getOption("qwraps2_frmt_digits", 1

Currently it is working ok if I do not load ggpubr, but I am not sure if that is functioning as expected.

By submitting and issue I affirm:

dewittpe commented 3 years ago

The problem here is that ggpubr and qwraps2 both have a function mean_sd within their namespaces. The solution is to explicitly use the namespace to call the version of the mean_sd. That is, write qwraps2::mean_sd or ggpubr::mean_sd to specify which version of the function you want to use. Note that the order the namespaces are loaded and attached to the session will change the order the function are used along the search tree.

teddychao commented 3 years ago

@dewittpe Many thanks!