Grouping in this manner doesn't seem tidy and I don't understand what the grouping criteria would be, so if you want to create the groupings manually you could do something like this
library(tidyverse)
sample_df <- data.frame(stringsAsFactors=FALSE,
SUBJECT = c("AA", "AB", "AD", "AF", "AG", "AH"),
SYMPTOMATIC = c("YES", "YES", "YES", "YES", "YES", "YES"),
PROG.11 = c(76.27, 187.995, NA, 303.014, 78.008, 264.179),
PROG.10 = c(137.103, 294.134, 165.59, 233.919, 272.676, 586.99),
PROG.9 = c(NA, 300.879, 193.45, 115.764, 147.447, 165.701),
PROG.8 = c(143.811, 313.079, 130.65, 272.676, 123.496, 95.292),
PROG.7 = c(361.197, 211.899, 113.41, 261.404, 166.615, 399.361)
)
sample_df %>%
rowwise() %>%
mutate(PROG.11_10 = mean(c(PROG.11, PROG.10), na.rm = TRUE))
#> Source: local data frame [6 x 8]
#> Groups: <by row>
#>
#> # A tibble: 6 x 8
#> SUBJECT SYMPTOMATIC PROG.11 PROG.10 PROG.9 PROG.8 PROG.7 PROG.11_10
#> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 AA YES 76.3 137. NA 144. 361. 107.
#> 2 AB YES 188. 294. 301. 313. 212. 241.
#> 3 AD YES NA 166. 193. 131. 113. 166.
#> 4 AF YES 303. 234. 116. 273. 261. 268.
#> 5 AG YES 78.0 273. 147. 123. 167. 175.
#> 6 AH YES 264. 587. 166. 95.3 399. 426.
Although I think it would be better if you work with your data in a long format and try to define a grouping criteria, this would be your sample data in long format.
sample_df %>%
pivot_longer(starts_with("PROG"),
names_to = "TIME",
values_to = "PROG",
names_pattern = "(\\d+)") %>%
mutate(TIME = as.numeric(TIME)) %>%
arrange(SUBJECT, SYMPTOMATIC, TIME)
#> # A tibble: 30 x 4
#> SUBJECT SYMPTOMATIC TIME PROG
#> <chr> <chr> <dbl> <dbl>
#> 1 AA YES 7 361.
#> 2 AA YES 8 144.
#> 3 AA YES 9 NA
#> 4 AA YES 10 137.
#> 5 AA YES 11 76.3
#> 6 AB YES 7 212.
#> 7 AB YES 8 313.
#> 8 AB YES 9 301.
#> 9 AB YES 10 294.
#> 10 AB YES 11 188.
#> # … with 20 more rows