Different colours and labels for each df on one plot

ggplot2
#1

Hi,
andresrcs has kindly helped me with this complicated trend line taking into account two data frames on one plot:

library(dplyr)
library(tibbletime)
library(ggplot2)

df1_n <- df1 %>%
  select(InterviewDate, A2TB) %>% 
  mutate(InterviewDate = as.POSIXct(InterviewDate, tz = 'UTC'), df = 'df1')


df2_n <- df2 %>%
  select(InterviewDate, A2TB) %>% 
  mutate(InterviewDate = as.POSIXct(InterviewDate, tz = 'UTC'), df = 'df2')

df1_n %>% 
  rbind(df2_n) %>%
  arrange(InterviewDate) %>% 
  as_tbl_time(index = InterviewDate) %>%
  collapse_by("1 month", side = "start", clean = TRUE) %>%
  group_by(df, InterviewDate) %>%
  summarise(A2TB_mean = mean(A2TB, na.rm = TRUE)) %>% 
  ggplot(aes(x = InterviewDate, y = A2TB_mean, color = df)) +
  geom_line() +
  geom_label(aes(label = scales::number(A2TB_mean, accuracy = 0.1)),
             fill = "black",
             color = 'white',
             show.legend = FALSE) +
  scale_x_datetime(date_breaks = "1 month", date_labels = '%Y-%m') +
  theme_classic() +
  theme(axis.text.x = element_text(angle=45, hjust=1, vjust = 1))

it works fine but I cannot find a way to modify line colours and labels background colours for each df…
I need for example blue line and background for df1 and purple line and background for df2

Can you help?

0 Likes

#2

As usuall, please ask your questions with a REPRoducible EXample (reprex), you are not providing sample data (i.e. df1 and df2). Don't expect for other people to search in your previous questions for information and context

0 Likes

#3

I have issues with that but, following your suggestions, I can use datapasta:

datapasta::df_paste(df1)

data.frame(stringsAsFactors=FALSE,
                                     URN = c("9x013122510", "9x013680557", "9x014145627",
                                             "9x015094359", "9x013122478",
                                             "9x012544645", "9x013122457",
                                             "9x015094333", "9x014145611", "9x014963276",
                                             "9x015104994", "9x013233865",
                                             "9x015094394", "9x013918536",
                                             "9x013122546", "9x013122646", "9x013359154",
                                             "9x013122574", "9x013122548",
                                             "9x015104981", "9x013918605", "9x013122618",
                                             "9x013918581", "9x013122341",
                                             "9x013122547", "9x013122698",
                                             "9x012654879", "9x013703410", "9x013122485",
                                             "9x014853449", "9x013122486",
                                             "9x014032625", "9x013122697", "9x013122342",
                                             "9x012545899", "9x014145624",
                                             "9x013233864", "9x013703438",
                                             "9x013918532", "9x014635481", "9x012544643",
                                             "9x013918584", "9x013122284",
                                             "9x012544539", "9x013680544", "9x013918572",
                                             "9x013918545", "9x014032615",
                                             "9x014635460", "9x015094372"),
                           InterviewDate = c("2018-06-04 16:42:00", "2018-05-21 08:30:00",
                                             "2018-10-15 13:04:32",
                                             "2018-12-17 11:03:42", "2018-06-04 21:25:00",
                                             "2017-03-20 20:54:00",
                                             "2018-06-05 10:23:00", "2018-12-23 12:01:17",
                                             "2018-10-15 19:02:13",
                                             "2018-12-10 09:02:05", "2018-12-22 11:01:14",
                                             "2018-05-26 15:10:00",
                                             "2018-12-20 22:01:27", "2018-05-18 08:59:00",
                                             "2018-06-04 14:57:00", "2018-05-31 21:02:00",
                                             "2018-05-25 16:05:00",
                                             "2018-06-04 12:27:00", "2018-06-04 14:28:00",
                                             "2018-12-29 21:01:06",
                                             "2018-09-25 14:01:32", "2018-06-03 22:41:00",
                                             "2018-10-01 09:01:57",
                                             "2017-01-18 08:24:00", "2018-06-04 14:49:00",
                                             "2018-05-28 13:46:00", "2017-01-09 11:02:00",
                                             "2018-05-20 09:19:00",
                                             "2018-06-04 19:45:00", "2018-12-01 12:01:20",
                                             "2018-06-04 19:14:00",
                                             "2018-10-08 08:02:09", "2018-05-28 14:14:00",
                                             "2017-01-12 09:18:00",
                                             "2017-01-01 10:33:00", "2018-10-15 13:04:32",
                                             "2018-05-26 16:21:00",
                                             "2018-05-18 19:16:00", "2018-05-18 10:54:00",
                                             "2018-11-16 20:01:54", "2017-02-02 10:51:00",
                                             "2018-09-25 12:02:14",
                                             "2017-01-15 14:32:00", "2017-01-28 00:11:00",
                                             "2018-05-21 09:50:00",
                                             "2018-09-26 11:02:27", "2018-05-17 19:40:00",
                                             "2018-10-02 11:02:39",
                                             "2018-11-24 13:01:10", "2018-12-19 15:01:21"),
                                      A1 = c(100, 100, 90, 100, 80, 50, 90, 80, 70, 90, 90, 90, 100,
                                             100, 100, 90, 90, 100, 100, 100,
                                             100, 100, 100, 100, 80, 90, 80, 100,
                                             100, 80, 90, 80, 90, 80, 80, 80,
                                             100, 90, 100, 90, 100, 90, 90, 90, 100,
                                             100, 100, 80, 100, 80),
                                      A2 = c(100, 100, 90, 100, 80, 40, 100, 80, 70, 90, 90, 90, 100,
                                             100, 100, 90, 90, 100, 100, 100,
                                             100, 100, 100, 100, 80, 90, 80, 100,
                                             100, 80, 90, 80, 90, 90, 90, 80,
                                             100, 90, 100, 90, 100, 90, 90, 90, 100,
                                             100, 100, 80, 100, 80),
                                      B1 = c(100, 100, 90, 100, 90, 60, 90, 80, 80, 90, 100, 90, 90,
                                             100, 100, 90, 90, 90, 100, 100,
                                             100, 100, 100, 100, 80, 80, 80, 100,
                                             100, 80, 80, 80, 80, 80, 90, 100, 90,
                                             80, 100, 80, 80, 90, 80, 90, 100,
                                             100, 100, 90, 80, 80),
                                      B2 = c(NA, NA, NA, NA, NA, 60, NA, 80, 80, NA, NA, NA, NA, NA,
                                             NA, NA, NA, NA, NA, NA, NA, NA,
                                             NA, NA, 80, 70, 90, NA, NA, 80, 80,
                                             80, 80, 90, NA, NA, NA, 80, NA, 80,
                                             100, NA, 80, NA, NA, NA, NA, NA, 80,
                                             80),
                                      B3 = c(NA, NA, NA, NA, NA, 60, NA, 80, 80, NA, NA, NA, NA, NA,
                                             NA, NA, NA, NA, NA, NA, NA, NA,
                                             NA, NA, 80, 80, 80, NA, NA, 80, 80,
                                             80, 80, 90, NA, NA, NA, 70, NA, 80,
                                             100, NA, 80, NA, NA, NA, NA, NA, 90,
                                             80),
                                      B4 = c(NA, NA, NA, NA, NA, 50, NA, 80, 80, NA, NA, NA, NA, NA,
                                             NA, NA, NA, NA, NA, NA, NA, NA,
                                             NA, NA, 80, 80, 80, NA, NA, 80, 90,
                                             80, 80, 90, NA, NA, NA, 70, NA, 80,
                                             100, NA, 80, NA, NA, NA, NA, NA, 80,
                                             80),
                                      B5 = c(NA, NA, NA, NA, NA, 50, NA, NA, 80, NA, NA, NA, NA, NA,
                                             NA, NA, NA, NA, NA, NA, NA, NA,
                                             NA, NA, 80, 70, 80, NA, NA, 80, 90,
                                             80, 90, 80, NA, NA, NA, 70, NA, 90,
                                             100, NA, 80, NA, NA, NA, NA, NA, 90,
                                             80),
                                      B6 = c(NA, NA, NA, NA, NA, NA, NA, 80, 80, NA, NA, NA, NA, NA,
                                             NA, NA, NA, NA, NA, NA, NA, NA,
                                             NA, NA, 80, 10, 90, NA, NA, 80, 80,
                                             80, 60, 70, NA, NA, NA, 70, NA, 100,
                                             100, NA, 80, NA, NA, NA, NA, NA, 80,
                                             80),
                                    OS21 = c(NA, NA, NA, NA, NA, 50, NA, 80, 80, NA, NA, NA, NA, NA,
                                             NA, NA, NA, NA, NA, NA, NA, NA,
                                             NA, NA, 80, 80, 90, NA, NA, 80, 90,
                                             80, 80, 80, NA, NA, NA, 80, NA, 90,
                                             100, NA, 80, NA, NA, NA, NA, NA, 100,
                                             80),
                                      C1 = c(100, 100, 100, 100, 80, 50, 90, 90, 80, 100, 90, 90, 90,
                                             100, 100, 100, 90, 100, 100, 100,
                                             100, 100, 100, 100, 80, 100, 90,
                                             100, 100, 80, 90, 80, 90, 90, 80, 80,
                                             100, 90, 100, 90, 100, 90, 90, 90,
                                             100, 100, 100, 90, 90, 90),
                                      C2 = c(100, 100, 100, 100, 90, 50, 100, 90, 70, 100, 100, 80,
                                             100, 100, 100, 100, 100, 100, 100,
                                             100, 100, 100, 100, 100, 80, 100,
                                             80, 100, 100, 80, 90, 80, 90, 90,
                                             100, 80, 100, 100, 100, 100, 100, 90,
                                             90, 60, 100, 100, 100, 100, 100, 80),
                                      C3 = c(100, 100, 100, 100, 90, 60, 100, 90, 80, 100, 90, 90, 90,
                                             100, 100, 100, 90, 100, 100, 100,
                                             100, 100, 100, 100, 80, 90, 80, 100,
                                             100, 80, 90, 80, 90, 90, 100, 80,
                                             100, 80, 100, 90, 100, 90, 90, 80,
                                             100, 100, 100, 90, 100, 80),
                                      C4 = c(NA, NA, NA, NA, 90, 60, NA, NA, 90, NA, NA, NA, NA, NA,
                                             NA, NA, NA, NA, NA, NA, NA, NA,
                                             NA, NA, 80, NA, NA, NA, NA, 80, NA,
                                             80, NA, NA, 100, 90, NA, NA, NA, NA,
                                             NA, NA, NA, NA, NA, NA, NA, NA, NA,
                                             NA),
                                      C5 = c(NA, NA, NA, NA, 90, 60, NA, NA, 90, NA, NA, NA, NA, NA,
                                             NA, NA, NA, NA, NA, NA, NA, NA,
                                             NA, NA, 80, NA, NA, NA, NA, 80, NA,
                                             80, NA, NA, 100, 80, NA, NA, NA, NA,
                                             NA, NA, NA, NA, NA, NA, NA, NA, NA,
                                             NA),
                                      C6 = c(NA, NA, NA, NA, 90, 60, NA, NA, 80, NA, NA, NA, NA, NA,
                                             NA, NA, NA, NA, NA, NA, NA, NA,
                                             NA, NA, 80, NA, NA, NA, NA, 80, NA,
                                             80, NA, NA, 100, 90, NA, NA, NA, NA,
                                             NA, NA, NA, NA, NA, NA, NA, NA, NA,
                                             NA),
                                      C7 = c(NA, NA, NA, NA, 90, 60, NA, NA, 90, NA, NA, NA, NA, NA,
                                             NA, NA, NA, NA, NA, NA, NA, NA,
                                             NA, NA, 80, NA, NA, NA, NA, 80, NA,
                                             80, NA, NA, 100, 100, NA, NA, NA, NA,
                                             NA, NA, NA, NA, NA, NA, NA, NA, NA,
                                             NA),
                                      C8 = c(NA, NA, NA, NA, 90, 60, NA, NA, 90, NA, NA, NA, NA, NA,
                                             NA, NA, NA, NA, NA, NA, NA, NA,
                                             NA, NA, 80, NA, NA, NA, NA, 80, NA,
                                             80, NA, NA, 100, 90, NA, NA, NA, NA,
                                             NA, NA, NA, NA, NA, NA, NA, NA, NA,
                                             NA),
                                      D1 = c(100, 100, 90, 100, 80, 990, 90, -10, 100, -10, -10, 100,
                                             -10, 100, 100, 90, 80, 90, 100,
                                             100, 100, 100, -10, 100, 990, 100, 80,
                                             100, 100, 990, 90, 60, 90, 100, 80,
                                             90, 100, 90, 100, -10, 70, -10,
                                             -10, 990, 100, 100, 100, 80, -10, 80),
                                      E1 = c(100, 100, 100, 100, 90, 70, 90, 90, 80, 100, 100, 80, 100,
                                             100, 100, 90, 90, 100, 100, 100,
                                             100, 100, 100, 100, 80, 80, 80, 100,
                                             100, 80, 90, 80, 90, 90, 90, 80,
                                             100, 80, 100, 90, 100, 100, 90, 90,
                                             100, 100, 100, 80, 90, 80),
                                      E2 = c(100, 100, 100, 100, 90, 80, 50, 90, 90, 100, 100, 90, 100,
                                             100, 100, 90, 90, 100, 100, 80,
                                             100, 100, 100, 100, 80, 100, 80, 100,
                                             100, 80, 90, 80, 90, 100, 100, 90,
                                             100, 90, 100, 90, 100, 90, 80, 70,
                                             100, 100, 100, 80, 100, 80),
                                      E3 = c(NA, NA, NA, NA, NA, 70, NA, NA, 80, NA, NA, 90, NA, NA,
                                             NA, NA, NA, NA, NA, NA, NA, NA,
                                             NA, NA, 80, 100, 80, NA, NA, 70, NA,
                                             80, NA, NA, NA, 90, NA, 90, NA, NA,
                                             NA, NA, NA, NA, NA, NA, NA, 80, NA,
                                             80),
                                    OS17 = c(NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
                                             NA, NA, NA, NA, NA, NA, NA, NA,
                                             NA, NA, NA, NA, NA, NA, NA, NA, NA,
                                             NA, NA, NA, NA, NA, NA, NA, NA, NA,
                                             NA, NA, NA, NA, NA, NA, NA, NA, NA,
                                             NA),
                                      F1 = c(100, 100, 100, 100, 90, 60, 90, 90, 80, 100, 100, 90, 100,
                                             100, 100, 90, 90, 90, 100, 100,
                                             100, 100, 100, 100, 80, 100, 70, 100,
                                             100, 80, 100, 80, 90, 80, 100, 90,
                                             100, 90, 100, 90, 100, 90, 90, 90,
                                             100, 100, 100, 80, 100, 80),
                                      F2 = c(NA, NA, NA, NA, NA, 80, NA, NA, 100, NA, NA, NA, NA, NA,
                                             NA, NA, NA, NA, NA, NA, NA, NA,
                                             NA, NA, 80, NA, 80, NA, NA, 80, NA,
                                             80, NA, 100, NA, NA, NA, NA, NA, NA,
                                             NA, NA, NA, NA, NA, NA, NA, 90, NA,
                                             80),
                                      F3 = c(NA, NA, NA, NA, NA, 80, NA, NA, 80, NA, NA, NA, NA, NA,
                                             NA, NA, NA, NA, NA, NA, NA, NA,
                                             NA, NA, 80, NA, 80, NA, NA, 80, NA,
                                             80, NA, 100, NA, NA, NA, NA, NA, NA,
                                             NA, NA, NA, NA, NA, NA, NA, 90, NA,
                                             80),
                                      F4 = c(NA, NA, NA, NA, NA, 60, NA, NA, 100, NA, NA, NA, NA, NA,
                                             NA, NA, NA, NA, NA, NA, NA, NA,
                                             NA, NA, 80, NA, 80, NA, NA, 80, NA,
                                             80, NA, 100, NA, NA, NA, NA, NA, NA,
                                             NA, NA, NA, NA, NA, NA, NA, 80, NA,
                                             80),
                                      F5 = c(NA, NA, NA, NA, NA, 60, NA, NA, 60, NA, NA, NA, NA, NA,
                                             NA, NA, NA, NA, NA, NA, NA, NA,
                                             NA, NA, 80, NA, 80, NA, NA, 80, NA,
                                             80, NA, 90, NA, NA, NA, NA, NA, NA,
                                             NA, NA, NA, NA, NA, NA, NA, 80, NA,
                                             70),
                                      F6 = c(NA, NA, NA, NA, NA, 70, NA, NA, 60, NA, NA, NA, NA, NA,
                                             NA, NA, NA, NA, NA, NA, NA, NA,
                                             NA, NA, 80, NA, 10, NA, NA, 50, NA,
                                             80, NA, 90, NA, NA, NA, NA, NA, NA,
                                             NA, NA, NA, NA, NA, NA, NA, 70, NA,
                                             70),
                                      F7 = c(NA, NA, NA, NA, NA, 70, NA, NA, 60, NA, NA, NA, NA, NA,
                                             NA, NA, NA, NA, NA, NA, NA, NA,
                                             NA, NA, 80, NA, 60, NA, NA, 80, NA,
                                             80, NA, 90, NA, NA, NA, NA, NA, NA,
                                             NA, NA, NA, NA, NA, NA, NA, 60, NA,
                                             60),
                                      G1 = c(100, 100, 0, 100, 0, 60, 90, 0, 90, 100, 100, 60, 0, 100,
                                             100, 90, 70, 100, 100, 100, 100,
                                             0, 100, 100, 0, 100, 0, 100, 0, 80,
                                             0, 80, 90, 80, 0, 0, 100, 90, 100,
                                             90, 100, 0, 0, 90, 100, 100, 100, 0,
                                             0, 0),
                               ModelLong = c("ccc", "bbb", "eee", "eee", "ccc (2016 ~ )",
                                             "ccc (2016 ~ )", "ccc (2016 ~ )",
                                             "ccc (2016 ~ )", "ccc (2016 ~ )",
                                             "ccc (2016 ~ )", "ccc (2016 ~ )",
                                             "ccc (2016 ~ )", "ccc (2016 ~ )",
                                             "ccc (2016 ~ )", "ccc (2016 ~ )",
                                             "ccc (2016 ~ )", "ccc (2016 ~ )",
                                             "ccc (2016 ~ )", "ccc (2016 ~ )",
                                             "ccc (2016 ~ )", "ccc (2016 ~ )",
                                             "ccc (2016 ~ )", "ccc (2016 ~ )", "ccc (2016 ~ )",
                                             "ccc (2016 ~ )", "ccc (2016 ~ )",
                                             "bbb", "bbb", "bbb", "bbb", "bbb",
                                             "bbb", "bbb", "bbb", "ccc (2016 ~ )",
                                             "ccc (2016 ~ )", "ccc (2016 ~ )",
                                             "ccc (2016 ~ )", "ccc (2016 ~ )",
                                             "ccc (2016 ~ )", "ccc (2016 ~ )",
                                             "aaa (2014 ~ )", "aaa (2014 ~ )",
                                             "aaa (2014 ~ )", "aaa (2014 ~ )",
                                             "aaa (2014 ~ )", "aaa (2014 ~ )",
                                             "aaa (2014 ~ )", "aaa (2014 ~ )",
                                             "aaa (2014 ~ )"),
                                    A2TB = c(100, 100, 100, 100, 0, 0, 100, 0, 0, 100, 100, 100, 100,
                                             100, 100, 100, 100, 100, 100, 100,
                                             100, 100, 100, 100, 0, 100, 0, 100,
                                             100, 0, 100, 0, 100, 100, 100, 0,
                                             100, 100, 100, 100, 100, 100, 100,
                                             100, 100, 100, 100, 0, 100, 0)
                        )

0 Likes

#4

and:

datapasta::df_paste(df2)

data.frame(stringsAsFactors=FALSE,
                           URN = c("9x022654978", "9x022655438", "9x022654959",
                                   "9x022655235", "9x022655311", "9x022655182",
                                   "9x022769691", "9x022769606", "9x022769911",
                                   "9x022771411", "9x022770918", "9x022769959",
                                   "9x022771259", "9x022769901", "9x022770011",
                                   "9x022769753", "9x022770687", "9x022769714",
                                   "9x022769999", "9x022771445", "9x022771059",
                                   "9x022772001", "9x022770643", "9x022886354",
                                   "9x022886173", "9x022885261", "9x022885815",
                                   "9x022769748", "9x022886324", "9x022885320",
                                   "9x022886304", "9x022885079", "9x022886023",
                                   "9x022886192", "9x022771761", "9x022769458",
                                   "9x022884640", "9x022770337", "9x022770419",
                                   "9x022886214", "9x022885956", "9x022769854",
                                   "9x022772203", "9x022771705", "9x022884556",
                                   "9x022772016", "9x022885164", "9x022885003",
                                   "9x022771938", "9x022770183", "9x022770090", "9x022545168",
                                   "9x022769830", "9x022885087", "9x022885373"),
                 InterviewDate = c("2018-07-02 07:16:00", "2018-07-02 14:31:00",
                                   "2018-07-02 20:14:00",
                                   "2018-07-05 08:37:00", "2018-07-05 20:19:00",
                                   "2018-07-06 07:11:00", "2018-07-10 10:51:00",
                                   "2018-07-10 10:53:00", "2018-07-10 10:57:00",
                                   "2018-07-10 11:15:00", "2018-07-10 11:21:00",
                                   "2018-07-10 11:23:00", "2018-07-10 11:34:00",
                                   "2018-07-10 12:05:00", "2018-07-10 12:55:00",
                                   "2018-07-10 13:06:00", "2018-07-10 15:03:00",
                                   "2018-07-10 15:55:00", "2018-07-10 16:24:00",
                                   "2018-07-10 18:52:00", "2017-01-27 13:15:00",
                                   "2017-01-04 09:29:00", "2017-01-03 19:48:00",
                                   "2017-01-13 12:59:00", "2017-02-08 13:27:00",
                                   "2017-02-03 16:56:00", "2017-01-27 11:35:00",
                                   "2017-01-27 14:18:00", "2017-01-27 10:09:00",
                                   "2017-02-11 18:40:00", "2017-01-27 10:42:00",
                                   "2017-01-28 14:52:00", "2017-01-28 10:57:00",
                                   "2017-01-28 08:18:00", "2017-01-29 09:26:00",
                                   "2017-01-27 18:36:00", "2017-01-30 12:21:00",
                                   "2017-02-22 19:38:00", "2017-02-03 15:22:00",
                                   "2017-02-01 17:53:00", "2017-01-27 13:52:00",
                                   "2017-02-01 11:41:00", "2017-01-02 12:34:00",
                                   "2017-01-02 17:09:00", "2017-01-02 18:54:00",
                                   "2018-07-15 10:39:00", "2018-07-15 12:07:00",
                                   "2018-07-15 15:52:00", "2018-07-16 07:49:00",
                                   "2018-07-16 08:49:00", "2018-07-16 10:37:00",
                                   "2018-07-16 16:01:00", "2018-07-16 20:21:00",
                                   "2018-07-18 08:11:00", "2018-07-19 01:42:00"),
                            A1 = c(80, 80, 90, 90, 80, 80, 80, 70, 80, 70, 80, 80, 90, 80,
                                   100, 80, 100, 70, 80, 80, 100, 80, 60, 100,
                                   80, 90, 90, 90, 100, 90, 90, 80, 70, 90, 80,
                                   90, 90, 100, 80, 100, 90, 80, 80, 80, 100, 80,
                                   100, 90, 100, 80, 90, 70, 70, 100, 90),
                            A2 = c(80, 70, 90, 90, 80, 90, 80, 80, 80, 70, 80, 70, 90, 80,
                                   100, 80, 100, 80, 80, 80, 100, 80, 70, 100,
                                   90, 80, 80, 90, 100, 100, 90, 80, 70, 90, 80,
                                   90, 90, 100, 80, 100, 90, 80, 80, 80, 100, 80,
                                   100, 100, 100, 80, 80, 60, 70, 100, 90),
                            B1 = c(60, 80, 80, 90, 80, 80, 80, 80, 70, 70, 100, 80, 90, 80,
                                   100, 90, 100, 80, 90, 80, 100, 90, 30, 90,
                                   90, 80, 80, 80, 100, 90, 100, 80, 70, 80, 90,
                                   90, 90, 90, 80, 70, 90, 80, 90, 80, 90, 80,
                                   100, 80, 100, 80, 80, 70, 80, 90, 80),
                            B2 = c(60, 80, 80, NA, 80, 80, 80, 80, 80, 70, NA, 90, NA, 80,
                                   NA, NA, NA, 80, NA, 80, NA, NA, 40, NA, NA,
                                   80, 80, 80, NA, NA, NA, 70, 70, 80, NA, NA,
                                   NA, NA, 80, 60, NA, 80, NA, 80, NA, 80, NA, 90,
                                   NA, 80, 80, 80, 80, NA, 80),
                            B3 = c(80, 80, 80, NA, 80, 80, 70, 60, 80, 70, NA, 70, NA, 80,
                                   NA, NA, NA, 80, NA, 80, NA, NA, 30, NA, NA,
                                   80, 90, 80, NA, NA, NA, 70, 70, 90, NA, NA,
                                   NA, NA, 80, 70, NA, 80, NA, 70, NA, 80, NA, 80,
                                   NA, 90, 80, 80, NA, NA, 90),
                            B4 = c(70, 80, 90, NA, 90, 80, 80, 70, 70, 70, NA, 90, NA, 80,
                                   NA, NA, NA, 80, NA, 90, NA, NA, 60, NA, NA,
                                   80, 90, 80, NA, NA, NA, 80, 70, 90, NA, NA,
                                   NA, NA, 80, 70, NA, 80, NA, 80, NA, 80, NA, 90,
                                   NA, 90, 80, 80, 80, NA, 90),
                            B5 = c(60, 70, 90, NA, 80, 80, 80, 60, 60, 70, NA, 100, NA, 80,
                                   NA, NA, NA, 70, NA, 90, NA, NA, 70, NA, NA,
                                   60, 80, 60, NA, NA, NA, 70, 60, 80, NA, NA,
                                   NA, NA, 80, 90, NA, 60, NA, 50, NA, 80, NA, 90,
                                   NA, 60, 80, 60, 80, NA, 80),
                            C1 = c(70, 80, 80, 90, 80, 80, 80, 80, 90, 70, 90, 90, 90, 80,
                                   100, 80, 100, 80, 80, 80, 100, 90, 80, 90,
                                   80, 90, 80, 80, 100, 90, 100, 80, 70, 80, 80,
                                   90, 80, 100, 80, 80, 90, 80, 90, 70, 100, 90,
                                   100, 80, 100, 80, 80, 70, 80, 90, 80),
                            C2 = c(70, 80, 80, 90, 80, 80, 80, 70, 80, 70, 90, 90, 90, 80,
                                   100, 80, 100, 80, 80, 80, 100, 90, 70, 100,
                                   70, 70, 80, 80, 100, 100, 90, 80, 70, 90, 80,
                                   90, 80, 100, 80, 90, 100, 70, 90, 70, 100, 90,
                                   100, 90, 100, 80, 90, 70, 80, 90, 80),
                            C6 = c(70, 80, 80, NA, 80, 80, 80, 70, NA, 70, NA, NA, NA, 80,
                                   NA, 80, NA, 80, 80, 80, NA, NA, 80, NA, 90,
                                   NA, 80, 80, NA, NA, NA, NA, 70, 90, 80, NA,
                                   80, NA, NA, 80, NA, 80, NA, 60, NA, NA, NA, 90,
                                   NA, 80, 80, 70, 80, NA, 80),
                            C3 = c(70, 80, 80, NA, 80, 80, 80, 80, NA, 80, NA, NA, NA, 80,
                                   NA, 80, NA, 80, 80, 90, NA, NA, 80, NA, 90,
                                   NA, 80, 80, NA, NA, NA, 80, 70, 80, 80, NA,
                                   80, NA, 80, 90, NA, 80, NA, 70, NA, NA, NA, 100,
                                   NA, 80, 80, 80, 80, NA, 80),
                            C4 = c(70, 80, 80, NA, 80, 80, 80, 80, NA, 70, NA, NA, NA, 80,
                                   NA, 80, NA, 80, 80, 90, NA, NA, 80, NA, 70,
                                   NA, 90, 80, NA, NA, NA, 80, 70, 80, 80, NA,
                                   70, NA, 80, 80, NA, 80, NA, NA, NA, NA, NA, 90,
                                   NA, 80, 80, 70, 80, NA, 80),
                            C5 = c(70, 80, 70, NA, 80, 80, 80, 80, NA, 70, NA, NA, NA, 80,
                                   NA, 80, NA, 80, 80, 80, NA, NA, 80, NA, 90,
                                   NA, 90, 80, NA, NA, NA, 80, 70, 80, 80, NA,
                                   80, NA, 80, 100, NA, 80, NA, 70, NA, NA, NA,
                                   100, NA, 80, 80, 50, 80, NA, 80),
                            C7 = c(70, 80, 80, NA, 80, 80, 80, 80, NA, 70, NA, NA, NA, 80,
                                   NA, 80, NA, 80, 80, 80, NA, NA, 80, NA, 80,
                                   NA, 90, 80, NA, NA, NA, 80, 70, 90, 80, NA,
                                   80, NA, 80, 100, NA, 90, NA, 70, NA, NA, NA, 90,
                                   NA, 80, 90, 50, 80, NA, 80),
                            C9 = c(70, 70, 80, NA, 80, 80, 80, 80, NA, 70, NA, NA, NA, 80,
                                   NA, 80, NA, 80, 80, 90, NA, NA, 50, NA, 90,
                                   NA, 90, 80, NA, NA, NA, 80, 70, 90, 80, NA,
                                   80, NA, 80, 100, NA, 90, NA, 70, NA, NA, NA, 90,
                                   NA, 80, 80, NA, 70, NA, 80),
                            C8 = c(70, 70, 80, NA, 80, 80, 90, 70, NA, 70, NA, NA, NA, 80,
                                   NA, 80, NA, 70, 90, 90, NA, NA, 60, NA, NA,
                                   NA, 90, 80, NA, NA, NA, 80, 70, 90, 80, NA,
                                   80, NA, 80, 80, NA, 90, NA, 70, NA, NA, NA, 90,
                                   NA, 70, 80, 60, 70, NA, 90),
                           OA8 = c(1, 2, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 2,
                                   1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1,
                                   3, 1, 1, 2, 1, 1, 1, 2, 1, 3, 1, 1, 1, 1, 2,
                                   1, 1, 2, 1, 2, 1),
                          OA8b = c(1, NA, 9, 10, NA, NA, NA, NA, 8, 7, 10, NA, NA, 9, NA, NA,
                                   NA, 8, NA, 9, 10, 8, NA, 10, 7, 8, 5, 7, 10,
                                   8, 10, 8, NA, 9, 6, 9, 10, NA, 10, 5, 10, NA,
                                   9, 7, 8, 9, 10, 9, NA, 8, 9, NA, 8, NA, NA),
                            D1 = c(70, 80, 90, 100, 80, 80, 80, 80, 80, 70, 100, 100, 90, 80,
                                   100, 80, 100, 90, 80, 90, 100, 90, 70, 100,
                                   90, 80, 90, 90, 100, 90, 100, 80, 70, 90, 80,
                                   90, 90, 90, 80, 80, 100, 80, 90, 80, 100, 80,
                                   100, 90, 100, 80, 90, 80, 80, 90, 80),
                            D2 = c(70, 90, NA, NA, 80, 80, 90, 80, 90, 80, NA, NA, NA, 90,
                                   NA, 80, NA, NA, 80, NA, NA, NA, 50, NA, NA,
                                   80, NA, NA, NA, NA, NA, 80, 70, NA, 90, NA,
                                   NA, NA, 80, 100, NA, 90, NA, 80, NA, 80, NA, NA,
                                   NA, 80, NA, 80, 80, NA, 90),
                            D3 = c(70, 80, NA, NA, 80, 80, 90, 70, 80, 70, NA, NA, NA, 90,
                                   NA, 80, NA, NA, 80, NA, NA, NA, 70, NA, NA,
                                   80, NA, NA, NA, NA, NA, 80, 70, NA, 90, NA,
                                   NA, NA, 80, 80, NA, 90, NA, 70, NA, 70, NA, NA,
                                   NA, 80, NA, 80, 80, NA, 80),
                            E1 = c(80, 80, 80, 100, 80, 80, 80, 80, 80, 70, 90, 100, 90, 80,
                                   100, 80, 100, 80, 90, 90, 100, 90, 70, 100,
                                   90, 80, 90, 90, 100, 90, 90, 80, 80, 90, 90,
                                   90, 90, 100, 80, 100, 90, 80, 80, 70, 100, 80,
                                   100, 100, 100, 80, 80, 80, 80, 90, 90),
                            E3 = c(40, 10, 10, 100, 80, 100, 80, 90, 10, 10, 70, 10, 90, 100,
                                   100, 100, 100, 100, 100, 10, 100, 100, 70,
                                   10, 100, 80, 100, 90, 10, 80, 90, 80, 80, 90,
                                   50, 90, 80, 90, 50, 100, 100, 90, 100, 70, 100,
                                   80, 10, 100, 100, 70, 100, 10, 80, 80, 60),
                            E4 = c(70, 80, 90, NA, 80, NA, 80, 80, 70, 80, NA, NA, NA, 90,
                                   NA, 80, NA, 80, NA, NA, NA, NA, 70, NA, NA,
                                   80, NA, NA, NA, NA, NA, 80, 80, NA, NA, NA,
                                   NA, NA, 80, NA, NA, 90, 100, 70, NA, 80, NA, NA,
                                   NA, 80, 80, 80, 80, NA, NA),
                            E2 = c(10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
                                   10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
                                   10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
                                   10, 10, 10, 20, 10, 10, 10, 20, 10, 10, 20, 10,
                                   10, 10, 10, 10, 10, 10, 10),
                            E5 = c(20, 20, 20, 20, 20, 20, 20, 20, 10, 20, 20, 20, 20, 20,
                                   20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 10,
                                   10, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
                                   20, 20, 20, 20, 20, 20, 20, 10, 20, 20, 20, 20,
                                   20, 20, 20, 20, 10, 20, 20),
                            F1 = c(70, 80, 80, 90, 80, 80, 80, 80, 80, 80, 90, 90, 90, 90,
                                   100, 80, 100, 80, 80, 80, 100, 90, 70, 90,
                                   90, 80, 90, 80, 100, 90, 100, 80, 80, 90, 80,
                                   90, 90, 90, 80, 80, 90, 80, 90, 60, 100, 80,
                                   100, 90, 100, 80, 90, 70, 80, 90, 80),
                            F2 = c(70, 60, 80, 100, 80, 80, 80, 80, 50, 70, 90, 100, 90, 90,
                                   100, 80, 100, 90, 90, 80, 100, 90, 80, 100,
                                   100, 80, 60, 80, 100, 80, 70, 80, 60, 100, 90,
                                   100, 70, 90, 60, 100, 90, 90, 90, 70, 100,
                                   70, 100, 90, 100, 80, 90, 70, 80, 90, 80),
                            F3 = c(70, 70, 80, NA, 80, 80, 80, NA, 70, 70, NA, NA, NA, NA,
                                   NA, 80, NA, 90, 80, 80, NA, NA, 50, NA, NA,
                                   80, NA, 80, NA, NA, NA, 80, 60, NA, 80, NA,
                                   NA, NA, 80, 80, NA, 90, NA, 70, NA, 80, NA, NA,
                                   NA, 70, NA, 60, 80, NA, 80),
                          OA45 = c(2, 2, 2, 2, 1, 1, 1, 2, 1, 2, 2, 2, 2, 2, 1, 2, 2, 2, 1,
                                   2, 1, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2,
                                   2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 2, 2, 2, 2, 2,
                                   2, 2, 2, 2, 2, 2),
                            G1 = c(0, 0, 0, 0, 80, 90, 80, 0, 80, 0, 0, 0, 0, 0, 100, 0, 0,
                                   0, 90, 0, 100, 0, 0, 0, 80, 80, 0, 0, 0, 0,
                                   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 90, 80, 90, 60,
                                   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
                     ModelLong = c("aaa (2007 ~ )", "bbb (2007 ~ )", "aaa (2007 ~ )",
                                   "ccc (2008 ~ 2011)", "aaa (2007 ~ )",
                                   "bbb (2007 ~ )", "ccc", "aaa (2007 ~ )", "ccc",
                                   "aaa (2007 ~ )", "aaa (2014 ~ )", "aaa (2014 ~ )",
                                   "bbb (2014 ~ )", "aaa (2007 ~ )",
                                   "aaa (2014 ~ )", "bbb (2007 ~ )", "bbb (2007 ~ )",
                                   "aaa (2007 ~ )", "aaa (2007 ~ )", "bbb (2007 ~ )",
                                   "aaa (2007 ~ )", "bbb (2007 ~ )",
                                   "aaa (2014 ~ )", "bbb (2014 ~ )", "ccc", "bbb (2014 ~ )",
                                   "aaa (2014 ~ )", "bbb (2014 ~ )",
                                   "aaa (2014 ~ )", "ccc (2008 ~ 2011)", "aaa (2014 ~ )",
                                   "bbb (2007 ~ )", "aaa (2014 ~ )", "aaa (2007 ~ )",
                                   "bbb (2007 ~ )", "aaa (2014 ~ )",
                                   "bbb (2014 ~ )", "aaa (2007 ~ )", "bbb (2007 ~ )",
                                   "bbb (2007 ~ )", "bbb (2014 ~ )",
                                   "ccc (2008 ~ 2011)", "aaa (2014 ~ )", "aaa (2007 ~ )",
                                   "aaa (2014 ~ )", "ccc (2008 ~ 2011)", "bbb (2007 ~ )",
                                   "aaa (2007 ~ )", "aaa (2007 ~ )",
                                   "aaa (2014 ~ )", "bbb (2014 ~ )", "aaa (2014 ~ )",
                                   "aaa (2014 ~ )", "aaa (2014 ~ )", "bbb (2007 ~ )"),
                          A2TB = c(0, 0, 100, 100, 0, 100, 0, 0, 0, 0, 0, 0, 100, 0, 100, 0,
                                   100, 0, 0, 0, 100, 0, 0, 100, 100, 0, 0,
                                   100, 100, 100, 100, 0, 0, 100, 0, 100, 100, 100,
                                   0, 100, 100, 0, 0, 0, 100, 0, 100, 100, 100,
                                   0, 0, 0, 0, 100, 100)
              )
0 Likes

closed #5

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.

0 Likes