0

Hi all: I am currently working on a dataset that is close to the Oxboys data in structure. What I am aspiring to achieve is a heatmap that shows for all 26 boys whether the percentage increase in their heights across the 9 occasions were the same as group average, higher than average or lower (Amber, Green, Red respectively). So, 26 rows & 8 columns with R-A-G in each intersecting cell. This is what I believe I need to do;

  1. create a vector with actual percentage increase in heights (what was the % increase on 2nd Occasion vis-a-vis first and so on
  2. calculate the average for each Occasion increase
  3. write this into a matrix
  4. use ggheat to create a heatmap

I need direction, advice, resources that I can look up to initiate this. many thanks..

here's first 18 rows of the data Subject numbers are reference to students // Occassion is the progressive time stamps when height measurements were taken

> head(ox_b, 18)
   Subject height Occasion
1        1  140.5        1
2        1  143.4        2
3        1  144.8        3
4        1  147.1        4
5        1  147.7        5
6        1  150.2        6
7        1  151.7        7
8        1  153.3        8
9        1  155.8        9
10       2  136.9        1
11       2  139.1        2
12       2  140.1        3
13       2  142.6        4
14       2  143.2        5
15       2  144.0        6
16       2  145.8        7
17       2  146.8        8
18       2  148.3        9
Adamm
  • 2,150
  • 22
  • 30
jee-vse
  • 1
  • 4
  • Provide some fake example data or part of actual data. Those four steps are pretty easy to achieve, however check [this](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) out. – Adamm Jan 24 '18 at 07:56
  • Thanks Adamm.. edited my question by adding a sample of my data – jee-vse Jan 24 '18 at 13:17

0 Answers0