Learn R Programming

VLMC (version 1.4-1)

bnrf1: BNRF1 Gene DNA sequences: Epstein-Barr and Herpes

Description

Two gene DNA data ``discrete time series'',

bnrf1EB

the BNRF1 gene from the Epstein-Barr virus,

bnrf1HV

the BNRF1 gene from the herpes virus.

Usage

data(bnrf1)

Arguments

Format

The EB sequence is of length 3954, whereas the HV has 3741 nucleotides. Both are R factors with the four levels c("a","c","g","t").

References

Shumway, R. and Stoffer, D. (2000) Time Series Analysis and its Applications. Springer Texts in Statistics.

Examples

Run this code
# NOT RUN {
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")
# }
# NOT RUN {
## Simplistic gene matching:
percent.eq <- sapply(0:200,
           function(i) 100 * sum(bnrf1EB[(1+i):(n+i)] ==  bnrf1HV))/n
plot.ts(percent.eq)
# }

Run the code above in your browser using DataLab