From e8dbfca0fcc7a8925e720c6831131d7bb71847a3 Mon Sep 17 00:00:00 2001 From: Don Pellegrino Date: Sat, 16 Jan 2010 19:21:19 +0000 Subject: R worksheet to explore the data from the HDF5 file. --- diff --git a/analysis/year.R b/analysis/year.R new file mode 100644 index 0000000..85d3da1 --- a/dev/null +++ b/analysis/year.R @@ -0,0 +1,19 @@ +# Explore the qualities of the year feature. + +require(hdf5); + +hdf5load("/home/don/exp007/src/influenza.h5", tidy = TRUE); + +d <- influenza.aa.dat; + +# 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, ] + +# Countries represented in the 1918 dataset. +p1918$Country; + +# All record with a year value. +years <- d[d$Year != 0, ]; + +hist(years$Year); -- cgit v0.8.3.1-22-g547a