Description Usage Format Author(s) Source References Examples
Two gene DNA data “discrete time series”,
bnrf1EB
the BNRF1 gene from the Epstein-Barr virus,
bnrf1HV
the BNRF1 gene from the herpes virus.
1 | data(bnrf1)
|
The EB sequence is of length
3954, whereas the HV has
3741 nucleotides.
Both are R factor
s with the four levels
c("a","c","g","t")
.
Martin Maechler (packaging for R).
See the references, data are online at http://anson.ucdavis.edu/~shumway/tsa.html
Shumway, R. and Stoffer, D. (2000) Time Series Analysis and its Applications. Springer Texts in Statistics.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | data(bnrf1)
bnrf1EB[1:500]
table(bnrf1EB)
table(bnrf1HV)
n <- length(bnrf1HV)
table(t = bnrf1HV[-1], "t-1" = bnrf1HV[-n])
plot(as.integer(bnrf1EB[1:500]), type = "b")
## Simplistic gene matching:
percent.eq <- sapply(0:200,
function(i) 100 * sum(bnrf1EB[(1+i):(n+i)] == bnrf1HV))/n
plot.ts(percent.eq)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.