R-Lum/Luminescence

plot_KDE() cannot handle Inf values

RLumSK opened this issue · 0 comments

Expected behaviour

The function automatically removes Inf values returning a warning.

Observed behaviour

The function crashes with

Error in plot.window(...) : need finite 'xlim' values
In addition: Warning message:
[plot_KDE()] Less than 2 points provided, no density plotted.

Running mini example

library(Luminescence)
data(ExampleData.DeValues, envir = environment())
df <- ExampleData.DeValues[[1]]
df[1,1] <- Inf
plot_KDE(data = df)

Reported by Dirk Mittelstraß.