View source: R/function_plotTweakHist.R
ggplot_ghistogram | R Documentation |
The resulting distribution of g is visualized best in a histogram. As the g vector may get spread over a big range, you can provide a transformation function. This will be applied on the g/tweak vector. If the provided transformation function returns NA, the function will state the number of NAs in the title of the plot. For an example see section "Histogram of g-vector" in the package vignette 'browseVignettes("DTD")'
ggplot_ghistogram( DTD.model, n.bins = NA, G.TRANSFORM.FUN = log10p1, title = "", x.lab = "log10(g+1)" )
DTD.model |
either a numeric vector with length of nrow(X), or a list
returned by |
n.bins |
: positive integer, number of bins in the histogram |
G.TRANSFORM.FUN |
function, that expects a vector of numerics, and returns a vector of the same length. Will be applied on each intermediate 'g' vector. Set 'G.TRANSFORM.FUN' to identity if no transformation is required. If you change 'G.TRANSFORM.FUN' don't forget to adjust the 'x.lab' parameter. |
title |
string, additionally title |
x.lab |
string, used as x label on the plot |
ggplot object
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.