## read example data set
data(ExampleData.DeValues, envir = environment())
ExampleData.DeValues <-
Second2Gray(ExampleData.DeValues$BT998, c(0.0438,0.0019))
## create plot straightforward
plot_KDE(data = ExampleData.DeValues)
## create plot with logarithmic x-axis
plot_KDE(data = ExampleData.DeValues,
log = "x")
## create plot with user-defined labels and axes limits
plot_KDE(data = ExampleData.DeValues,
main = "Dose distribution",
xlab = "Dose (s)",
ylab = c("KDE estimate", "Cumulative dose value"),
xlim = c(100, 250),
ylim = c(0, 0.08, 0, 30))
## create plot with boxplot option
plot_KDE(data = ExampleData.DeValues,
boxplot = TRUE)
## create plot with statistical summary below header
plot_KDE(data = ExampleData.DeValues,
summary = c("n", "median", "skewness", "in.2s"))
## create plot with statistical summary as legend
plot_KDE(data = ExampleData.DeValues,
summary = c("n", "mean", "sd.rel", "se.abs"),
summary.pos = "topleft")
## split data set into sub-groups, one is manipulated, and merge again
data.1 <- ExampleData.DeValues[1:15,]
data.2 <- ExampleData.DeValues[16:25,] * 1.3
data.3 <- list(data.1, data.2)
## create plot with two subsets straightforward
plot_KDE(data = data.3)
## create plot with two subsets and summary legend at user coordinates
plot_KDE(data = data.3,
summary = c("n", "median", "skewness"),
summary.pos = c(110, 0.07),
col = c("blue", "orange"))
## example of how to use the numerical output of the function
## return plot output to draw a thicker KDE line
KDE_out <- plot_KDE(data = ExampleData.DeValues,
output = TRUE)
Run the code above in your browser using DataLab