dcomtois / summarytools

R Package to Quickly and Neatly Summarize Data
512 stars 77 forks source link

dfSummary() and tidyverse() issue #84

Closed jakemkc closed 5 years ago

jakemkc commented 5 years ago

Hi,

I can run the following without errors and with expected results in the Viewer of Rstudio:

library(summarytools) view(dfSummary(iris))

However, after running

library(tidyverse)

and rerun

view(dfSummary(iris))

What I get is a dataframe view of the summary. Screen Shot 2

The tidyverse package is basically the first package always loaded in all my projects. I wonder could there be a fix about this?

Computer info: system: MacOS 10.14.6 R: 3.5.1 Rstudio: 1.2.1335 summarytools: 0.9.5 tidyverse: 1.2.1

Thanks! Jake

dcomtois commented 5 years ago

Oh that's a bummer... In what tidyverse package exactly is the view function defined?

Until a solution is found, I suggest loading summarytools after tidyverse.

jakemkc commented 5 years ago

Thanks. I agree with you that for now I have to unload/not loading tidyverse if I want to run dfSummary.

I think it has something to do with the tibble package comes with tidyverse 1.2.1. I can reproduce the issue when only loading tibble package.

dcomtois commented 5 years ago

I don't really see any other solution to this for now other than to create another view function with another name, but I don't think it's a necessity, at least for now... I'll reopen if there are more requests that go in that sense. Thx