Last data update: 2014.03.03
|
R: Show the slicing result
slice_show | R Documentation |
Show the slicing result
Description
Showing slicing result and plotting counts of observations in each slice.
Usage
slice_show(slices_obj, main="Counts in each slice", xlab="Slices", ylab="Percentage")
Arguments
slices_obj |
A matrix stores slicing strategy. It is a component of object returned by function dslice_k or dslice_eqp_k .
|
main |
An overall title for the plo
|
xlab |
A title for the x axis
|
ylab |
A title for the y axis
|
Value
A “ggplot” object which illustrates details of slicing.
See Also
ds_k , ds_eqp_k .
Examples
n <- 100
mu <- 0.5
y <- c(rnorm(n, -mu, 1), rnorm(n, mu, 1))
x <- c(rep(0, n), rep(1, n))
x <- x[order(y)]
xdim <- max(x) + 1
lambda <- 1.0
dsres <- ds_k(x, xdim, lambda, slice = TRUE)
ds_show <- slice_show(dsres$slices)
Results
|