dcomtois / summarytools

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

dfSummary() fails with Inf in data #139

Closed mgoldburd closed 3 years ago

mgoldburd commented 3 years ago

Thanks for writing this excellent package!

dfSummary() throws an error if there is an Inf or -Inf in the data -- these should be removed in calculating the histogram, and perhaps include some message in the output alerting the user to the presence of the Inf's.

example <- tibble(x=c(rnorm(100),Inf)) dfSummary(example) Error in hist.default(data, breaks = breaks_x, plot = FALSE) : some 'x' not counted; maybe 'breaks' do not span range of 'x'

dcomtois commented 3 years ago

Thanks for signalling this. Surprisingly (package has been there for several years now) it was never brought up before. I'll figure out something.

dcomtois commented 3 years ago

Fixed in upcoming version. For now no histograms are shown; I have other plans for a future release. Stay tuned!