TkBuildDist(x = seq(min + (max - min)/nbin/2, max - (max - min)/nbin/2, length.out = nbin), min = 0, max = 10, nbin = 10, logspline = TRUE, intervals = FALSE)
TkBuildDist2( min=0, max=1, nbin=10, logspline=TRUE)
logspline
is TRUE), the x-values clicked on
(for TkBuildDist
), and the proportion of the distribution
within each interval (for TkBuildDist2
or if intervals
is TRUE).TkBuildDist
function then a left click on the
histogram will add an additional point to the histogram bar clicked on
(the actual x-value where clicked will be saved, returned, and used in
the optional logspline unless intervals
is TRUE). Right
clicking on the histogram will remove the point closest to where
clicked (based only on x), which will usually have the effect of
decreasing the clicked bar by 1, but could affect the neigboring bar
if you click near the edge or click on a bar that is 0.
If you use the TkBuildDist2
function then the individual bars
can be adjusted by clicking at the top of a bar and dragging up or
down, or clicking at what you want the new height of the bar to be.
As the current bar is adjusted the other bars will adjust in the
oposite direction proportional to their current heights.
The logspline fit assumes the basis for the distribution is the real
line, the min
and max
arguments only control the
histogram and where values can be changed.if(interactive()){
tmp1 <- TkBuildDist()
tmp2 <- TkBuildDist2()
}
Run the code above in your browser using DataLab