make.histograms = function(set, det, hvar="cw", breaks=NULL) {
message("\n Deprecated. Use bio.snowcrab::size_distributions() instead.\n")
nbins = length(breaks)-1
sids = sort(unique(set$sid))
nsids = length(sids)
out = matrix(data=0, nrow=nsids, ncol=nbins)
for (sid in 1:nsids) {
det1 = det[ which(det$sid==sids[sid]), ]
hi = hist(det1[,hvar], breaks=breaks, plot=F)
out[sid,] = hi$counts / set$sa[ which(set$sid==sids[sid])]
}
rownames(out) = sids
colnames(out) = breaks[-1]
return(out)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.