View source: R/get_histogramscale.R
get.histogramscale | R Documentation |
Requires a data.frame as produced by [datsteps()] or a number as DAT_df_steps. Calculates the value with which the y-axis of a density graph should be multiplied by in order to be visible in the corresponding histogram.
get.histogramscale(DAT_df_steps, binwidth = "stepsize")
DAT_df_steps |
a data.frame as returned by [datsteps()]. (Will also work with a single number and a vector.) |
binwidth |
the bandwidth to use for the density function and histogram. Should equal the stepsize used to create the data.frame. If a data.frame as returned by [datsteps()] is given, stepsize can be automatically assigned using the corresponding attribute ('binwidth = "stepsize"') |
the value with which to scale the density curve to a histogram plot so that both will be visible
data("Inscr_Bithynia")
DAT_df <- Inscr_Bithynia[, c("ID", "Location", "DAT_min", "DAT_max")]
DAT_df_steps <- datsteps(DAT_df, stepsize = 25)
get.histogramscale(DAT_df_steps)
get.histogramscale(DAT_df_steps$DAT_step, binwidth = 20)
get.histogramscale(500, binwidth = 20)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.