summaryrefslogtreecommitdiffstats
path: root/analysis/year.R (plain)
blob: 6d68925fc2e4d88ae76b990d346a6384382d42b1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Explore the qualities of the year feature.

require(hdf5);

hdf5load("/home/don/exp007/src/influenza.h5", tidy = TRUE);

A <- influenza.aa.dat;
B <- influenza.faa;

# Join the two tables by GB value.
C <- merge (A, B, by.x = "GenBank accession number", by.y = "GB");

# All records for 1918.  Based on code from
# http://wiki.r-project.org/rwiki/doku.php?id=tips:data-frames:select_observations
D <- C[C$Year == 1918, ]

summary (D);

# Countries represented in the 1918 dataset.
D$Country;

D[D$"Protein Type" == "HA", ]

# All record with a year value.
E <- A[A$Year != 0, ];

hist(E$Year);

Valid XHTML 1.0 Strict

Copyright © 2009 Don Pellegrino All Rights Reserved.