author | Don Pellegrino <don@drexel.edu> | 2010-01-16 19:21:19 (GMT) |
---|---|---|
committer | Don Pellegrino <don@drexel.edu> | 2010-01-16 19:21:19 (GMT) |
commit | e8dbfca0fcc7a8925e720c6831131d7bb71847a3 (patch) (unidiff) | |
tree | 5b84c2dbfb059193eddfdff9bdf12784082ced5e | |
parent | 1501b0b828fab86848cbfc242925964685da3e83 (diff) | |
download | exp007-e8dbfca0fcc7a8925e720c6831131d7bb71847a3.zip exp007-e8dbfca0fcc7a8925e720c6831131d7bb71847a3.tar.gz exp007-e8dbfca0fcc7a8925e720c6831131d7bb71847a3.tar.bz2 |
R worksheet to explore the data from the HDF5 file.
-rw-r--r-- | analysis/year.R | 19 |
1 files changed, 19 insertions, 0 deletions
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 @@ | |||
1 | # Explore the qualities of the year feature. | ||
2 | |||
3 | require(hdf5); | ||
4 | |||
5 | hdf5load("/home/don/exp007/src/influenza.h5", tidy = TRUE); | ||
6 | |||
7 | d <- influenza.aa.dat; | ||
8 | |||
9 | # All records for 1918. Based on code from | ||
10 | # http://wiki.r-project.org/rwiki/doku.php?id=tips:data-frames:select_observations | ||
11 | p1918 <- d[d$Year == 1918, ] | ||
12 | |||
13 | # Countries represented in the 1918 dataset. | ||
14 | p1918$Country; | ||
15 | |||
16 | # All record with a year value. | ||
17 | years <- d[d$Year != 0, ]; | ||
18 | |||
19 | hist(years$Year); | ||