dcomtois / summarytools

R Package to Quickly and Neatly Summarize Data

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dfSummary() fails with Inf in data

mgoldburd opened this issue · comments

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'

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

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