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) (side-by-side diff)
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);
hdf5load("/home/don/exp007/src/influenza.h5", tidy = TRUE);
-d <- influenza.aa.dat;
+A <- influenza.aa.dat;
+
+B <- influenza.faa;
# All records for 1918. Based on code from
# http://wiki.r-project.org/rwiki/doku.php?id=tips:data-frames:select_observations
-p1918 <- d[d$Year == 1918, ]
+C <- A[A$Year == 1918, ]
# Countries represented in the 1918 dataset.
-p1918$Country;
+C$Country;
# All record with a year value.
-years <- d[d$Year != 0, ];
+D <- A[A$Year != 0, ];
+
+hist(D$Year);
+
+B[B$GI == 305182, ]
-hist(years$Year);
+B[B$"Protein Type" == "HA", ]

Valid XHTML 1.0 Strict

Copyright © 2009 Don Pellegrino All Rights Reserved.