bin_length | R Documentation |
Generate different bin size
bin_length(x, Lmin, Lmax, bin)
x |
length frequency |
Lmin |
minimum length |
Lmax |
maximun length |
bin |
bin size |
# Sample (Bonito)
freq <- c(0, 0,0,0,0,0,0,0, 11,9, 18, 23, 20, 28, 43, 37 26,9,0,2,1,0
,4,5,7,4,1,0,0,2,2,7,9,5,2,2,0,2,0,0,0,0,0,0 ,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
len3 <- bin_length(x = xnx, Lmin = 18, Lmax = 75, bin = 3)
len2 <- bin_length(x = xnx, Lmin = 18, Lmax = 75, bin = 2)
len1 <- bin_length(x = xnx, Lmin = 18, Lmax = 75, bin = 1)
seq_len3 <- seq(18, 75, by = 3)
seq_len2 <- seq(18, 75, by = 2)
seq_len1 <- seq(18, 75, by = 1)
plot(seq_len3, len3$freq, type = "l", col = 2, lwd = 2, ylab = "Frequency", xlab = "Length")
lines(seq_len2, len2$freq, col = 3, lwd = 2)
lines(seq_len1, len1$freq, col = 4, lwd = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.