summaryrefslogtreecommitdiffstats
authorDon Pellegrino <don@drexel.edu>2010-01-18 18:46:28 (GMT)
committer Don Pellegrino <don@drexel.edu>2010-01-18 18:46:28 (GMT)
commit596c72970883c6c3245c97d656d1608ff8568833 (patch) (unidiff)
tree71c1e6849e4bce447454484583a89d8ca6fe384c
parent0871f6cf645c20673e45946c3ba3ddaa2ffb47aa (diff)
downloadexp007-596c72970883c6c3245c97d656d1608ff8568833.zip
exp007-596c72970883c6c3245c97d656d1608ff8568833.tar.gz
exp007-596c72970883c6c3245c97d656d1608ff8568833.tar.bz2
Scratch for exploring the HDF5 file in R.
-rw-r--r--analysis/year.R16
1 files changed, 11 insertions, 5 deletions
diff --git a/analysis/year.R b/analysis/year.R
index 85d3da1..b7da3c8 100644
--- a/analysis/year.R
+++ b/analysis/year.R
@@ -4,16 +4,22 @@ require(hdf5);
44
5hdf5load("/home/don/exp007/src/influenza.h5", tidy = TRUE);5hdf5load("/home/don/exp007/src/influenza.h5", tidy = TRUE);
66
7d <- influenza.aa.dat;7A <- influenza.aa.dat;
8
9B <- influenza.faa;
810
9# All records for 1918. Based on code from11# All records for 1918. Based on code from
10# http://wiki.r-project.org/rwiki/doku.php?id=tips:data-frames:select_observations12# http://wiki.r-project.org/rwiki/doku.php?id=tips:data-frames:select_observations
11p1918 <- d[d$Year == 1918, ]13C <- A[A$Year == 1918, ]
1214
13# Countries represented in the 1918 dataset.15# Countries represented in the 1918 dataset.
14p1918$Country;16C$Country;
1517
16# All record with a year value.18# All record with a year value.
17years <- d[d$Year != 0, ];19D <- A[A$Year != 0, ];
20
21hist(D$Year);
22
23B[B$GI == 305182, ]
1824
19hist(years$Year);25B[B$"Protein Type" == "HA", ]

Valid XHTML 1.0 Strict

Copyright © 2009 Don Pellegrino All Rights Reserved.