Displaying 2 results from an estimated 2 matches for "n_bins".
Did you mean:
bins
2012 Oct 06
3
vector is not assigned correctly in for loop
Hi there,
Here is a minimum working example:
----------------------------------------------------------------
lower = 0
upper = 1
n_bins = 50
interval = (upper - lower) / n_bins
bins = vector(mode="numeric", length=n_bins)
breaks = seq(from=lower + interval, to=upper, by=interval)
for(idx in breaks)
{
bins[idx / interval] = idx
}
print(bins)
----------------------------------------------------------------
which outputs:...
2009 Jul 20
3
Histograms on a log scale
Dear All,
I would like to be able to plot histograms/densities on a semi-log or
log-log scale.
I found several suggestions online
http://tolstoy.newcastle.edu.au/R/help/05/09/12044.html
https://stat.ethz.ch/pipermail/r-help/2002-June/022295.html
http://www.harding.edu/fmccown/R/#histograms
Now, consider the code snippet taken from
http://www.harding.edu/fmccown/R/#histograms
# Get a random