I have an eye tracking data file which I need to transform. Let me explain, my data are formated like this:
Event; Info; Pupil size
Message; Start_trial_0;
Fixation; L; 1020
Fixation; L; 1200
Fixation; L; 980
Fixation; L; 990
Fixation; L; 1003
Message; Trial_0;
Message; ACC_1;
Message; RT_850;
Message; Stop_trial_0;
Message; Start_trial_1;
Fixation; L; 1023
Fixation; L; 1020
Fixation; L; 997
Fixation; L; 1123
Message; Trial_1;
Message; ACC_1;
Message; RT_920;
Message; Stop_trial_1;
Message; Strat_trial_2;
...
Knowing that, I never have the same number of "Fixation" line for each trial.
I want my data to be like that:
Trial_0; ACC_0; RT_850; Fixation; L; 1020
Trial_0; ACC_0; RT_850; Fixation; L; 1200
Trial_0; ACC_0; RT_850; Fixation; L; 980
Trial_0; ACC_0; RT_850; Fixation; L; 990
Trial_0; ACC_0; RT_850; Fixation; L; 1003
Trial_1; ACC_1; RT_920; Fixation; L; 1023
Trial_1; ACC_1; RT_920; Fixation; L; 1020
Trial_1; ACC_1; RT_920; Fixation; L; 997
Trial_1; ACC_1; RT_920; Fixation; L; 1123
...
As I'm not an experimented R user, I absolutely don't know how to do that (if it's possible). And as my data file contain over 1000000 lines, it cannot be done manually ...
Thanks in advance for your precious help !
Jibs.
The general approach is to split your lines into buckets of all the same trial, then pull out the metadata vs data lines, and make them into a dataframe (assuming that's what you ultimately want).
library(stringr)
library(purrr)
# You may be reading this in with `readLines` or similar,
# in which case you may not need to split on "\n" below
eye_text <-
"Event; Info; Pupil size
Message; Start_trial_0;
Fixation; L; 1020
Fixation; L; 1200
Fixation; L; 980
Fixation; L; 990
Fixation; L; 1003
Message; Trial_0;
Message; ACC_1;
Message; RT_850;
Message; Stop_trial_0;
Message; Start_trial_1;
Fixation; L; 1023
Fixation; L; 1020
Fixation; L; 997
Fixation; L; 1123
Message; Trial_1;
Message; ACC_1;
Message; RT_920;
Message; Stop_trial_1;
Message; Start_trial_2;" # Fixed typo?
# Depending how you read in the data, may already be a vector of lines
eye_lines <- str_split(eye_text, "\n")[[1]]
# Figure out where each trial starts
eye_starts <- cumsum(str_detect(eye_lines, "Start"))
Split the data
str_detect(eye_lines, "Start") gives you a vector of TRUE/FALSE indicating the start of each trial. cumsum coerces that to 1/0 and takes the running total. This way you end up with 0 0 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 3, or four groups from the sample text (the header, Trial 0, Trial 1, and one line of Trial 2).
eye_parser <- function(strings) {
message_indices <- str_detect(strings, "Message;") & !str_detect(strings, "Start|Stop")
messages <-
strings[message_indices] %>%
str_remove_all("Message; ") %>%
str_c(collapse = " ")
if (length(messages) == 0) return(NULL)
observations <- strings[!str_detect(strings, "Message")]
str_c(messages, observations, sep = " ")
}
Here we subset the strings twice: first we get all the Message; lines (but not the Start*/Stop* lines), then we get all the non-Message; lines.
For the messages, we strip out "Message; ", which leaves you with the metadata values (a vector of "Trial_0;", "ACC_1;", ... etc). Then you str_c those all back together into a single metadata line: "Trial_0; ACC_1; RT_850;".
At this point if the messages are all empty (like the header and partial trial), we just return NULL.
For the observations, we just take them as is. Then we str_c the messages and observations together, repeating messages in front of every observation line.
To use this function, we first split all your lines into the groups from above, then purrr::map the function over each group of strings. unlist takes it from a list of vectors to a single vector, and then str_split(..., "; ", simplify = T) breaks it out into a character matrix with columns. Finally as.data.frame makes it into a dataframe.
split(eye_lines, eye_starts) %>%
map(eye_parser) %>%
unlist(use.names = F) %>%
str_split("; ", simplify = T) %>%
as.data.frame()
V1 V2 V3 V4 V5 V6
1 Trial_0 ACC_1 RT_850 Fixation L 1020
2 Trial_0 ACC_1 RT_850 Fixation L 1200
3 Trial_0 ACC_1 RT_850 Fixation L 980
4 Trial_0 ACC_1 RT_850 Fixation L 990
5 Trial_0 ACC_1 RT_850 Fixation L 1003
6 Trial_1 ACC_1 RT_920 Fixation L 1023
7 Trial_1 ACC_1 RT_920 Fixation L 1020
8 Trial_1 ACC_1 RT_920 Fixation L 997
9 Trial_1 ACC_1 RT_920 Fixation L 1123
Caveats:
If your metadata isn't always exactly "Trial", "ACC", "RT" in that order, you'll probably want to extract those specifically. You can use the same code pattern I used for messages but for each of those individually. Then you can make sure they're present and in the correct order.
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 2L, 1L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L,
2L, 2L, 2L, 2L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L,
2L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 1L,
1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 1L, 1L, 1L,
1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 1L, 1L, 1L, 2L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 2L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 1L, 1L, 1L,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51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L,
51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L,
51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L,
51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L,
51L, 172L, 51L, 128L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L,
11L, 1L, 220L, 3L, 95L, 7L, 218L, 173L, 129L, 51L, 51L, 51L,
51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L,
51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L,
51L, 35L, 61L, 219L, 3L, 86L, 7L, 218L, 174L, 140L, 51L, 51L,
51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 41L, 66L, 219L,
3L, 107L, 7L, 216L, 185L, 51L, 151L, 51L, 51L, 51L, 51L, 27L,
83L, 220L, 3L, 98L, 7L, 216L, 196L, 162L, 51L, 51L, 51L, 51L,
51L, 30L, 57L, 219L, 3L, 88L, 7L, 217L, 207L, 167L, 51L, 51L,
51L, 51L, 51L, 51L, 36L, 62L, 220L, 3L, 93L, 7L, 217L, 211L,
168L, 51L, 51L, 51L, 51L, 48L, 71L, 219L, 3L, 85L, 7L, 216L,
212L, 169L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 26L, 83L,
220L, 3L, 102L, 7L, 216L, 213L, 170L, 51L, 51L, 51L, 51L, 51L,
51L, 51L, 29L, 56L, 220L, 3L, 101L, 4L, 218L, 214L, 51L, 171L,
51L, 51L, 51L, 51L, 51L, 51L, 51L, 49L, 72L, 220L, 2L, 103L,
4L, 216L, 215L, 130L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L,
51L, 51L, 51L, 20L, 80L, 219L, 3L, 116L, 4L, 218L, 175L, 131L,
51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L,
51L, 25L, 83L, 219L, 3L, 125L, 4L, 216L, 176L, 132L, 51L, 51L,
51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L,
51L, 51L, 51L, 51L, 51L, 32L, 52L, 219L, 3L, 126L, 4L, 218L,
177L, 133L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 8L,
53L, 220L, 3L, 97L, 4L, 218L, 178L, 134L, 51L, 51L, 51L, 51L,
51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 40L, 65L, 219L,
3L, 117L, 4L, 216L, 179L, 135L, 51L, 51L, 51L, 51L, 51L, 51L,
51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 9L, 74L, 220L,
3L, 121L, 4L, 216L, 180L, 136L, 51L, 51L, 51L, 51L, 51L, 51L,
51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L,
51L, 51L, 28L, 55L, 220L, 3L, 84L, 6L, 218L, 181L, 137L, 51L,
51L, 51L, 51L, 51L, 51L, 51L, 31L, 58L, 219L, 3L, 112L, 6L, 218L,
182L, 138L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L,
51L, 51L, 51L, 51L, 51L, 51L, 45L, 69L, 219L, 3L, 120L, 6L, 216L,
183L, 139L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L,
51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L,
51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L,
51L, 51L, 46L, 70L, 220L, 2L, 90L, 6L, 216L, 184L, 141L, 51L,
51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 37L, 63L,
219L, 3L, 114L, 6L, 216L, 186L, 142L, 51L, 51L, 51L, 51L, 51L,
51L, 51L, 51L, 39L, 65L, 220L, 3L, 100L, 6L, 216L, 187L, 143L,
51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L,
51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L,
51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 21L, 81L, 220L,
2L, 89L, 6L, 217L, 188L, 144L, 51L, 51L, 51L, 51L, 51L, 51L,
51L, 51L, 51L, 22L, 82L, 220L, 3L, 106L, 6L, 217L, 189L, 145L,
51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 33L, 59L, 219L,
3L, 110L, 5L, 216L, 190L, 146L, 51L, 51L, 51L, 51L, 51L, 51L,
51L, 51L, 44L, 68L, 220L, 3L, 99L, 5L, 216L, 191L, 147L, 51L,
51L, 51L, 51L, 51L, 50L, 73L, 220L, 3L, 91L, 5L, 218L, 192L,
148L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L,
51L, 10L, 75L, 219L, 2L, 115L, 5L, 218L, 193L, 149L, 51L, 51L,
51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L,
51L, 51L, 38L, 64L, 220L, 3L, 124L, 5L, 218L, 194L, 150L, 51L,
51L, 51L, 51L, 51L, 51L, 14L, 76L, 220L, 3L, 94L, 5L, 216L, 195L,
152L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L,
51L, 51L, 15L, 77L, 219L, 3L, 118L, 5L, 218L, 197L, 153L, 51L,
51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L,
51L, 51L, 51L, 18L, 79L, 219L, 3L, 122L, 5L, 216L, 198L, 154L,
51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L,
51L, 51L, 51L, 34L, 60L, 220L, 3L, 119L, 7L, 216L, 199L, 155L,
51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 42L, 67L, 220L,
3L, 108L, 7L, 218L, 200L, 51L, 156L, 51L, 51L, 51L, 51L, 51L,
43L, 68L, 219L, 3L, 96L, 7L, 216L, 201L, 157L, 51L, 51L, 51L,
51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 19L, 80L, 219L,
3L, 123L, 7L, 218L, 202L, 158L, 51L, 51L, 51L, 51L, 51L, 51L,
51L, 51L, 51L, 12L, 76L, 219L, 3L, 111L, 7L, 217L, 203L, 159L,
51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 13L, 76L, 220L,
3L, 113L, 7L, 217L, 204L, 160L, 51L, 51L, 51L, 51L, 51L, 51L,
51L, 51L, 16L, 78L, 220L, 2L, 104L, 7L, 216L, 205L, 161L, 51L,
51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 17L, 79L, 219L,
3L, 109L, 7L, 216L, 206L, 163L, 51L, 51L, 51L, 51L, 51L, 51L,
51L, 51L, 23L, 54L, 219L, 3L, 105L, 7L, 216L, 208L, 51L, 164L,
51L, 51L, 51L, 51L, 51L, 24L, 54L, 220L, 3L, 92L, 7L, 217L, 209L,
165L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L,
51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L,
51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 47L, 70L,
220L, 3L, 87L, 7L, 217L, 210L, 166L, 51L, 51L, 51L, 51L, 51L,
51L, 51L, 51L, 51L, 51L, 51L), .Label = c("36=32mod4", "correct_0",
"correct_1", "difficulty_Easy", "difficulty_Hard", "difficulty_Intermediate",
"difficulty_Very", "id_1058", "id_10975", "id_11207", "id_1129",
"id_12052", "id_12069", "id_12131", "id_12453", "id_13285", "id_13741",
"id_13817", "id_14467", "id_14596", "id_14907", "id_15262", "id_1544",
"id_1555", "id_15661", "id_15684", "id_15693", "id_1685", "id_2295",
"id_2479", "id_2820", "id_313", "id_3645", "id_3985", "id_4333",
"id_4541", "id_5249", "id_5426", "id_5684", "id_5756", "id_6016",
"id_6326", "id_7019", "id_7064", "id_7885", "id_8660", "id_8728",
"id_9028", "id_9263", "id_9419", "L", "modulo_26", "modulo_36",
"modulo_40", "modulo_42", "modulo_46", "modulo_47", "modulo_50",
"modulo_55", "modulo_57", "modulo_58", "modulo_59", "modulo_63",
"modulo_64", "modulo_65", "modulo_66", "modulo_68", "modulo_71",
"modulo_74", "modulo_77", "modulo_78", "modulo_79", "modulo_80",
"modulo_85", "modulo_86", "modulo_89", "modulo_90", "modulo_93",
"modulo_94", "modulo_96", "modulo_97", "modulo_98", "modulo_99",
"RT_10590", "RT_1367", "RT_14182", "RT_15412", "RT_1550", "RT_17151",
"RT_17302", "RT_1736", "RT_1891", "RT_2002", "RT_2227", "RT_2241",
"RT_2432", "RT_2510", "RT_2624", "RT_2660", "RT_2840", "RT_2956",
"RT_2984", "RT_3029", "RT_3154", "RT_3273", "RT_3283", "RT_3727",
"RT_3900", "RT_4493", "RT_4544", "RT_4840", "RT_5095", "RT_5368",
"RT_5583", "RT_5618", "RT_6009", "RT_6385", "RT_6423", "RT_6489",
"RT_6689", "RT_7471", "RT_7669", "RT_7697", "RT_8156", "RT_8752",
"RT_8784", "start_consigne", "start_trial_0", "start_trial_1",
"start_trial_10", "start_trial_11", "start_trial_12", "start_trial_13",
"start_trial_14", "start_trial_15", "start_trial_16", "start_trial_17",
"start_trial_18", "start_trial_19", "start_trial_2", "start_trial_20",
"start_trial_21", "start_trial_22", "start_trial_23", "start_trial_24",
"start_trial_25", "start_trial_26", "start_trial_27", "start_trial_28",
"start_trial_29", "start_trial_3", "start_trial_30", "start_trial_31",
"start_trial_32", "start_trial_33", "start_trial_34", "start_trial_35",
"start_trial_36", "start_trial_37", "start_trial_38", "start_trial_39",
"start_trial_4", "start_trial_40", "start_trial_41", "start_trial_42",
"start_trial_43", "start_trial_5", "start_trial_6", "start_trial_7",
"start_trial_8", "start_trial_9", "stop_consigne", "stop_trial_0",
"stop_trial_1", "stop_trial_10", "stop_trial_11", "stop_trial_12",
"stop_trial_13", "stop_trial_14", "stop_trial_15", "stop_trial_16",
"stop_trial_17", "stop_trial_18", "stop_trial_19", "stop_trial_2",
"stop_trial_20", "stop_trial_21", "stop_trial_22", "stop_trial_23",
"stop_trial_24", "stop_trial_25", "stop_trial_26", "stop_trial_27",
"stop_trial_28", "stop_trial_29", "stop_trial_3", "stop_trial_30",
"stop_trial_31", "stop_trial_32", "stop_trial_33", "stop_trial_34",
"stop_trial_35", "stop_trial_36", "stop_trial_37", "stop_trial_38",
"stop_trial_39", "stop_trial_4", "stop_trial_40", "stop_trial_41",
"stop_trial_42", "stop_trial_5", "stop_trial_6", "stop_trial_7",
"stop_trial_8", "stop_trial_9", "strat_1", "strat_2", "strat_4",
"val_0", "val_1"), class = "factor"), PS = c(NA, 904L, 906L,
838L, 805L, 789L, 797L, 876L, 924L, 928L, 964L, 957L, 935L, 861L,
834L, 856L, 846L, 811L, 825L, 869L, 904L, 936L, 969L, 965L, 1016L,
1018L, 1030L, 1015L, 999L, 987L, 1017L, 1064L, 1080L, 1061L,
1075L, 1046L, 1005L, 1014L, 1023L, 1040L, 1051L, 1046L, 1010L,
971L, 994L, 1071L, 1082L, 1120L, 1119L, 1044L, 1023L, 978L, 947L,
925L, 900L, 940L, NA, 963L, NA, 995L, 1013L, 1046L, 1005L, 1013L,
1043L, 1146L, 1205L, NA, NA, NA, NA, NA, NA, NA, NA, NA, 1306L,
1334L, 1285L, 1297L, 1257L, 1206L, 1206L, 1256L, 1252L, 1189L,
1254L, 1214L, 1203L, 1207L, 1263L, 1224L, 1235L, 1258L, 1210L,
1186L, 1201L, 1271L, 1246L, 1274L, 1337L, 1325L, 1551L, 1733L,
1812L, 1568L, NA, NA, NA, NA, NA, NA, NA, NA, NA, 1272L, 1218L,
1227L, 1165L, 1145L, 1192L, 1199L, 1208L, 1248L, 1280L, 1224L,
NA, NA, NA, NA, NA, NA, NA, NA, 1220L, NA, 1229L, 1250L, 1372L,
1102L, NA, NA, NA, NA, NA, NA, NA, NA, NA, 1141L, 1163L, 1146L,
1129L, 1190L, NA, NA, NA, NA, NA, NA, NA, NA, NA, 1182L, 1152L,
1134L, 1179L, 1178L, 1267L, NA, NA, NA, NA, NA, NA, NA, NA, NA,
1272L, 1186L, 1164L, 1173L, NA, NA, NA, NA, NA, NA, NA, NA, NA,
1265L, 1191L, 1109L, 1150L, 1125L, 1090L, 1139L, 1205L, NA, NA,
NA, NA, NA, NA, NA, NA, NA, 1277L, 1164L, 1122L, 1113L, 1115L,
1121L, 1168L, NA, NA, NA, NA, NA, NA, NA, NA, 1235L, NA, 1207L,
1164L, 1145L, 1177L, 1242L, 1224L, 1281L, NA, NA, NA, NA, NA,
NA, NA, NA, NA, 1234L, 1232L, 1204L, 1198L, 1108L, 1131L, 1220L,
1228L, 1227L, 1231L, 1299L, NA, NA, NA, NA, NA, NA, NA, NA, NA,
1211L, 1266L, 1294L, 1292L, 1129L, 1182L, 1175L, 1211L, 1233L,
1206L, 1185L, 1307L, 1209L, 1206L, NA, NA, NA, NA, NA, NA, NA,
NA, NA, 1245L, 1264L, 1283L, 1246L, 1290L, 1344L, 1311L, 1267L,
1201L, 1188L, 1164L, 1218L, 1188L, 1156L, 1144L, 1121L, 1145L,
1176L, 1155L, 1103L, NA, NA, NA, NA, NA, NA, NA, NA, NA, 1173L,
1223L, 1218L, 1170L, 1120L, 1084L, 1096L, 1092L, 985L, NA, NA,
NA, NA, NA, NA, NA, NA, NA, 1043L, 1092L, 1090L, 1126L, 1099L,
1125L, 1175L, 1099L, 1102L, 1188L, 1215L, 1225L, 1197L, 1268L,
NA, NA, NA, NA, NA, NA, NA, NA, NA, 1292L, 1338L, 1322L, 1284L,
1296L, 1273L, 1251L, 1216L, 1205L, 1200L, 1165L, 1097L, 1132L,
1209L, 1243L, 1295L, NA, NA, NA, NA, NA, NA, NA, NA, NA, 1288L,
1286L, 1243L, 1245L, 1215L, 1213L, 1215L, 1283L, 1280L, 1275L,
1334L, 1301L, 1205L, 1215L, 1267L, 1245L, 1203L, 1071L, 1113L,
1160L, 1211L, NA, NA, NA, NA, NA, NA, NA, NA, NA, 1243L, 1249L,
1268L, 1266L, 1299L, 1363L, 1215L, NA, NA, NA, NA, NA, NA, NA,
NA, NA, 938L, 831L, 929L, 999L, 1033L, 1090L, 1092L, 1094L, 1139L,
1144L, 1225L, 1203L, 1199L, 1261L, 1221L, 1230L, NA, NA, NA,
NA, NA, NA, NA, NA, NA, 1291L, 1308L, 1270L, 1250L, 1276L, 1226L,
1197L, 1201L, 1213L, 1195L, 1202L, 1201L, 1194L, 1192L, 1190L,
1206L, 1244L, 1203L, 1228L, 1239L, 1218L, 1218L, 1217L, 1218L,
1202L, 1224L, 1177L, 1134L, 1134L, 1152L, 1159L, 1162L, 1168L,
1107L, 1175L, 1200L, 1173L, 1203L, NA, NA, NA, NA, NA, NA, NA,
NA, NA, 1266L, 1278L, 1227L, 1188L, 1184L, 1178L, 1167L, 1194L,
1131L, 1166L, 1203L, 1211L, NA, NA, NA, NA, NA, NA, NA, NA, NA,
1223L, 1226L, 1218L, 1208L, 1142L, 1105L, 1122L, 1156L, NA, NA,
NA, NA, NA, NA, NA, NA, NA, 1118L, 1133L, 1150L, 1115L, 1070L,
1078L, 1145L, 1156L, 1175L, 1172L, 1129L, 1134L, 1089L, 1144L,
1171L, 1179L, 1195L, 1194L, 1231L, 1275L, 1250L, 1273L, 1268L,
1221L, 1245L, 1211L, 1195L, 1197L, 1194L, 1140L, 1168L, 1220L,
1197L, 1191L, 1240L, 1288L, NA, NA, NA, NA, NA, NA, NA, NA, NA,
1339L, 1327L, 1324L, 1320L, 1242L, 1231L, 1253L, 1255L, 1268L,
NA, NA, NA, NA, NA, NA, NA, NA, NA, 1297L, 1303L, 1282L, 1252L,
1200L, 1202L, 1191L, 1177L, 1220L, NA, NA, NA, NA, NA, NA, NA,
NA, NA, 1221L, 1224L, 1203L, 1162L, 1175L, 1187L, 1184L, 1165L,
NA, NA, NA, NA, NA, NA, NA, NA, NA, 1200L, 1225L, 1200L, 1205L,
1219L, NA, NA, NA, NA, NA, NA, NA, NA, NA, 1269L, 1209L, 1161L,
1171L, 1165L, 1140L, 1120L, 1127L, 1076L, 1081L, 1081L, 1114L,
NA, NA, NA, NA, NA, NA, NA, NA, NA, 1181L, 1186L, 1189L, 1200L,
1179L, 1186L, 1171L, 1134L, 1012L, 1004L, 1134L, 1090L, 1146L,
1222L, 1309L, 1334L, 1354L, NA, NA, NA, NA, NA, NA, NA, NA, NA,
1240L, 1121L, 1101L, 1104L, 1142L, 1157L, NA, NA, NA, NA, NA,
NA, NA, NA, NA, 1197L, 1264L, 1217L, 1181L, 1173L, 1160L, 1147L,
1174L, 1188L, 1183L, 1162L, 1188L, 1273L, NA, NA, NA, NA, NA,
NA, NA, NA, NA, 1303L, 1335L, 1346L, 1284L, 1227L, 1245L, 1295L,
1291L, 1284L, 1125L, 1176L, 1214L, 1206L, 1216L, 1232L, 1234L,
1268L, NA, NA, NA, NA, NA, NA, NA, NA, NA, 1326L, 1284L, 1265L,
1237L, 1206L, 1212L, 1197L, 1181L, 1216L, 1222L, 1205L, 1148L,
1163L, 1154L, 1138L, 1146L, NA, NA, NA, NA, NA, NA, NA, NA, NA,
1250L, 1229L, 1209L, 1199L, 1165L, 1191L, 1145L, 1130L, 1116L,
NA, NA, NA, NA, NA, NA, NA, NA, 1101L, NA, 1113L, 1126L, 1138L,
1160L, 1128L, NA, NA, NA, NA, NA, NA, NA, NA, NA, 1155L, 1132L,
1122L, 1146L, 1145L, 1146L, 1171L, 1103L, 1170L, 1136L, 1177L,
1108L, 1106L, NA, NA, NA, NA, NA, NA, NA, NA, NA, 1175L, 1192L,
1129L, 1163L, 1187L, 1177L, 1162L, 1184L, 1129L, NA, NA, NA,
NA, NA, NA, NA, NA, NA, 1221L, 1113L, 1089L, 1099L, 1022L, 995L,
947L, 1012L, 1065L, 1114L, NA, NA, NA, NA, NA, NA, NA, NA, NA,
1163L, 1094L, 1098L, 1139L, 1130L, 1117L, 1087L, 1084L, NA, NA,
NA, NA, NA, NA, NA, NA, NA, 1137L, 1145L, 1130L, 1105L, 1123L,
1112L, 1048L, 1055L, 1078L, 1147L, NA, NA, NA, NA, NA, NA, NA,
NA, NA, 1207L, 1164L, 1169L, 1188L, 1189L, 1140L, 1099L, 1178L,
NA, NA, NA, NA, NA, NA, NA, NA, 1208L, NA, 1258L, 1207L, 1158L,
1140L, 1099L, NA, NA, NA, NA, NA, NA, NA, NA, NA, 1123L, 1083L,
1043L, 1066L, 1082L, 1049L, 1040L, 1090L, 1112L, 1069L, 1079L,
1061L, 1029L, 1032L, 1046L, 1170L, 1197L, 956L, 941L, 1076L,
1136L, 1208L, 1213L, 1207L, 1186L, 1225L, 1222L, 1232L, 1169L,
1102L, 1144L, 1178L, 1218L, 1211L, 1229L, NA, NA, NA, NA, NA,
NA, NA, NA, NA, 1255L, 1260L, 1236L, 1271L, 1312L, 1346L, 1272L,
1171L, 1192L, 1235L, 1296L), Modulo = structure(c(1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 4L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L,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 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 35L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 36L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 5L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 6L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 25L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L), .Label = c(" ", "26=12mod6", "36=16mod4", "36=32mod4",
"40=33mod8", "40=36mod2", "42=12mod6", "46=34mod6", "47=44mod2",
"50=20mod4", "55=20mod4", "57=15mod6", "58=52mod4", "59=57mod2",
"63=33mod4", "64=24mod8", "65=35mod6", "65=51mod6", "66=61mod6",
"68=26mod6", "71=21mod6", "71=31mod4", "74=53mod8", "77=53mod4",
"77=69mod2", "78=75mod4", "79=67mod6", "80=40mod4", "85=65mod4",
"86=50mod8", "89=32mod2", "89=35mod2", "89=49mod4", "90=50mod6",
"93=13mod8", "94=43mod4", "94=61mod4", "96=54mod4", "96=82mod6",
"97=75mod2", "98=76mod2", "99=85mod8", "99=91mod8", "99=93mod6"
), class = "factor")), class = "data.frame", row.names = c(NA,
-997L))
#Brian here is a sample of my dataset:
1 MSG start_consigne NA
2 EFI L 904
3 EFI L 906
4 EFI L 838
5 EFI L 805
6 EFI L 789
7 EFI L 797
8 EFI L 876
9 EFI L 924
10 EFI L 928
11 EFI L 964
12 EFI L 957
13 EFI L 935
14 EFI L 861
15 EFI L 834
16 EFI L 856
17 EFI L 846
18 EFI L 811
19 EFI L 825
20 EFI L 869
21 EFI L 904
22 EFI L 936
23 EFI L 969
24 EFI L 965
25 EFI L 1016
26 EFI L 1018
27 EFI L 1030
28 EFI L 1015
29 EFI L 999
30 EFI L 987
31 EFI L 1017
32 EFI L 1064
33 EFI L 1080
34 EFI L 1061
35 EFI L 1075
36 EFI L 1046
37 EFI L 1005
38 EFI L 1014
39 EFI L 1023
40 EFI L 1040
41 EFI L 1051
42 EFI L 1046
43 EFI L 1010
44 EFI L 971
45 EFI L 994
46 EFI L 1071
47 EFI L 1082
48 EFI L 1120
49 EFI L 1119
50 EFI L 1044
51 EFI L 1023
52 EFI L 978
53 EFI L 947
54 EFI L 925
55 EFI L 900
56 EFI L 940
57 MSG stop_consigne NA
58 EFI L 963
59 MSG start_trial_0 NA
60 EFI L 995
61 EFI L 1013
62 EFI L 1046
63 EFI L 1005
64 EFI L 1013
65 EFI L 1043
66 EFI L 1146
67 EFI L 1205
68 MSG id_1129 NA
69 MSG 36=32mod4 NA 36=32mod4
70 MSG val_1 NA
71 MSG correct_1 NA
72 MSG RT_2241 NA
73 MSG difficulty_Very NA
74 MSG strat_4 NA
75 MSG stop_trial_0 NA
76 MSG start_trial_1 NA
77 EFI L 1306
78 EFI L 1334
79 EFI L 1285
80 EFI L 1297
81 EFI L 1257
82 EFI L 1206
83 EFI L 1206
84 EFI L 1256
85 EFI L 1252
86 EFI L 1189
87 EFI L 1254
88 EFI L 1214
89 EFI L 1203
90 EFI L 1207
91 EFI L 1263
92 EFI L 1224
93 EFI L 1235
94 EFI L 1258
95 EFI L 1210
96 EFI L 1186
97 EFI L 1201
98 EFI L 1271
99 EFI L 1246
100 EFI L 1274
101 EFI L 1337
102 EFI L 1325
103 EFI L 1551
104 EFI L 1733
105 EFI L 1812
106 EFI L 1568
107 MSG id_4333 NA
108 MSG modulo_58 NA 58=52mod4
109 MSG val_0 NA
110 MSG correct_1 NA
111 MSG RT_14182 NA
112 MSG difficulty_Very NA
113 MSG strat_4 NA
114 MSG stop_trial_1 NA
115 MSG start_trial_2 NA
116 EFI L 1272
117 EFI L 1218
118 EFI L 1227
119 EFI L 1165
120 EFI L 1145
121 EFI L 1192
122 EFI L 1199
123 EFI L 1208
124 EFI L 1248
125 EFI L 1280
126 EFI L 1224
127 MSG id_6016 NA
128 MSG modulo_66 NA 66=61mod6
129 MSG val_0 NA
130 MSG correct_1 NA
131 MSG RT_3727 NA
132 MSG difficulty_Very NA
133 MSG strat_1 NA
134 MSG stop_trial_2 NA
135 EFI L 1220
136 MSG start_trial_3 NA
137 EFI L 1229
138 EFI L 1250
139 EFI L 1372
140 EFI L 1102
141 MSG id_15693 NA
142 MSG modulo_99 NA 99=93mod6
143 MSG val_1 NA
144 MSG correct_1 NA
145 MSG RT_2624 NA
146 MSG difficulty_Very NA
147 MSG strat_1 NA
148 MSG stop_trial_3 NA
149 MSG start_trial_4 NA````
structure(list(Event = structure(c(2L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 2L, 1L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L,
2L, 2L, 2L, 2L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L,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 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 2L, 1L, 1L, 1L, 1L, 1L, 2L, 2L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L,
2L, 2L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L), .Label = c("EFI",
"MSG"), class = "factor"), Info = structure(c(127L, 51L, 51L,
51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L,
51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L,
51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L,
51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L,
51L, 172L, 51L, 128L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L,
11L, 1L, 220L, 3L, 95L, 7L, 218L, 173L, 129L, 51L, 51L, 51L,
51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L,
51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L,
51L, 35L, 61L, 219L, 3L, 86L, 7L, 218L, 174L, 140L, 51L, 51L,
51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 41L, 66L, 219L,
3L, 107L, 7L, 216L, 185L, 51L, 151L, 51L, 51L, 51L, 51L, 27L,
83L, 220L, 3L, 98L, 7L, 216L, 196L, 162L, 51L, 51L, 51L, 51L,
51L, 30L, 57L, 219L, 3L, 88L, 7L, 217L, 207L, 167L, 51L, 51L,
51L, 51L, 51L, 51L, 36L, 62L, 220L, 3L, 93L, 7L, 217L, 211L,
168L, 51L, 51L, 51L, 51L, 48L, 71L, 219L, 3L, 85L, 7L, 216L,
212L, 169L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 26L, 83L,
220L, 3L, 102L, 7L, 216L, 213L, 170L, 51L, 51L, 51L, 51L, 51L,
51L, 51L, 29L, 56L, 220L, 3L, 101L, 4L, 218L, 214L, 51L, 171L,
51L, 51L, 51L, 51L, 51L, 51L, 51L, 49L, 72L, 220L, 2L, 103L,
4L, 216L, 215L, 130L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L,
51L, 51L, 51L, 20L, 80L, 219L, 3L, 116L, 4L, 218L, 175L, 131L,
51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L,
51L, 25L, 83L, 219L, 3L, 125L, 4L, 216L, 176L, 132L, 51L, 51L,
51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L,
51L, 51L, 51L, 51L, 51L, 32L, 52L, 219L, 3L, 126L, 4L, 218L,
177L, 133L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 8L,
53L, 220L, 3L, 97L, 4L, 218L, 178L, 134L, 51L, 51L, 51L, 51L,
51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 40L, 65L, 219L,
3L, 117L, 4L, 216L, 179L, 135L, 51L, 51L, 51L, 51L, 51L, 51L,
51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 9L, 74L, 220L,
3L, 121L, 4L, 216L, 180L, 136L, 51L, 51L, 51L, 51L, 51L, 51L,
51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L,
51L, 51L, 28L, 55L, 220L, 3L, 84L, 6L, 218L, 181L, 137L, 51L,
51L, 51L, 51L, 51L, 51L, 51L, 31L, 58L, 219L, 3L, 112L, 6L, 218L,
182L, 138L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L,
51L, 51L, 51L, 51L, 51L, 51L, 45L, 69L, 219L, 3L, 120L, 6L, 216L,
183L, 139L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L,
51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L,
51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L,
51L, 51L, 46L, 70L, 220L, 2L, 90L, 6L, 216L, 184L, 141L, 51L,
51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 37L, 63L,
219L, 3L, 114L, 6L, 216L, 186L, 142L, 51L, 51L, 51L, 51L, 51L,
51L, 51L, 51L, 39L, 65L, 220L, 3L, 100L, 6L, 216L, 187L, 143L,
51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L,
51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L,
51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 21L, 81L, 220L,
2L, 89L, 6L, 217L, 188L, 144L, 51L, 51L, 51L, 51L, 51L, 51L,
51L, 51L, 51L, 22L, 82L, 220L, 3L, 106L, 6L, 217L, 189L, 145L,
51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 33L, 59L, 219L,
3L, 110L, 5L, 216L, 190L, 146L, 51L, 51L, 51L, 51L, 51L, 51L,
51L, 51L, 44L, 68L, 220L, 3L, 99L, 5L, 216L, 191L, 147L, 51L,
51L, 51L, 51L, 51L, 50L, 73L, 220L, 3L, 91L, 5L, 218L, 192L,
148L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L,
51L, 10L, 75L, 219L, 2L, 115L, 5L, 218L, 193L, 149L, 51L, 51L,
51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L,
51L, 51L, 38L, 64L, 220L, 3L, 124L, 5L, 218L, 194L, 150L, 51L,
51L, 51L, 51L, 51L, 51L, 14L, 76L, 220L, 3L, 94L, 5L, 216L, 195L,
152L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L,
51L, 51L, 15L, 77L, 219L, 3L, 118L, 5L, 218L, 197L, 153L, 51L,
51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L,
51L, 51L, 51L, 18L, 79L, 219L, 3L, 122L, 5L, 216L, 198L, 154L,
51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L,
51L, 51L, 51L, 34L, 60L, 220L, 3L, 119L, 7L, 216L, 199L, 155L,
51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 42L, 67L, 220L,
3L, 108L, 7L, 218L, 200L, 51L, 156L, 51L, 51L, 51L, 51L, 51L,
43L, 68L, 219L, 3L, 96L, 7L, 216L, 201L, 157L, 51L, 51L, 51L,
51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 19L, 80L, 219L,
3L, 123L, 7L, 218L, 202L, 158L, 51L, 51L, 51L, 51L, 51L, 51L,
51L, 51L, 51L, 12L, 76L, 219L, 3L, 111L, 7L, 217L, 203L, 159L,
51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 13L, 76L, 220L,
3L, 113L, 7L, 217L, 204L, 160L, 51L, 51L, 51L, 51L, 51L, 51L,
51L, 51L, 16L, 78L, 220L, 2L, 104L, 7L, 216L, 205L, 161L, 51L,
51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 17L, 79L, 219L,
3L, 109L, 7L, 216L, 206L, 163L, 51L, 51L, 51L, 51L, 51L, 51L,
51L, 51L, 23L, 54L, 219L, 3L, 105L, 7L, 216L, 208L, 51L, 164L,
51L, 51L, 51L, 51L, 51L, 24L, 54L, 220L, 3L, 92L, 7L, 217L, 209L,
165L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L,
51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L,
51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 51L, 47L, 70L,
220L, 3L, 87L, 7L, 217L, 210L, 166L, 51L, 51L, 51L, 51L, 51L,
51L, 51L, 51L, 51L, 51L, 51L), .Label = c("36=32mod4", "correct_0",
"correct_1", "difficulty_Easy", "difficulty_Hard", "difficulty_Intermediate",
"difficulty_Very", "id_1058", "id_10975", "id_11207", "id_1129",
"id_12052", "id_12069", "id_12131", "id_12453", "id_13285", "id_13741",
"id_13817", "id_14467", "id_14596", "id_14907", "id_15262", "id_1544",
"id_1555", "id_15661", "id_15684", "id_15693", "id_1685", "id_2295",
"id_2479", "id_2820", "id_313", "id_3645", "id_3985", "id_4333",
"id_4541", "id_5249", "id_5426", "id_5684", "id_5756", "id_6016",
"id_6326", "id_7019", "id_7064", "id_7885", "id_8660", "id_8728",
"id_9028", "id_9263", "id_9419", "L", "modulo_26", "modulo_36",
"modulo_40", "modulo_42", "modulo_46", "modulo_47", "modulo_50",
"modulo_55", "modulo_57", "modulo_58", "modulo_59", "modulo_63",
"modulo_64", "modulo_65", "modulo_66", "modulo_68", "modulo_71",
"modulo_74", "modulo_77", "modulo_78", "modulo_79", "modulo_80",
"modulo_85", "modulo_86", "modulo_89", "modulo_90", "modulo_93",
"modulo_94", "modulo_96", "modulo_97", "modulo_98", "modulo_99",
"RT_10590", "RT_1367", "RT_14182", "RT_15412", "RT_1550", "RT_17151",
"RT_17302", "RT_1736", "RT_1891", "RT_2002", "RT_2227", "RT_2241",
"RT_2432", "RT_2510", "RT_2624", "RT_2660", "RT_2840", "RT_2956",
"RT_2984", "RT_3029", "RT_3154", "RT_3273", "RT_3283", "RT_3727",
"RT_3900", "RT_4493", "RT_4544", "RT_4840", "RT_5095", "RT_5368",
"RT_5583", "RT_5618", "RT_6009", "RT_6385", "RT_6423", "RT_6489",
"RT_6689", "RT_7471", "RT_7669", "RT_7697", "RT_8156", "RT_8752",
"RT_8784", "start_consigne", "start_trial_0", "start_trial_1",
"start_trial_10", "start_trial_11", "start_trial_12", "start_trial_13",
"start_trial_14", "start_trial_15", "start_trial_16", "start_trial_17",
"start_trial_18", "start_trial_19", "start_trial_2", "start_trial_20",
"start_trial_21", "start_trial_22", "start_trial_23", "start_trial_24",
"start_trial_25", "start_trial_26", "start_trial_27", "start_trial_28",
"start_trial_29", "start_trial_3", "start_trial_30", "start_trial_31",
"start_trial_32", "start_trial_33", "start_trial_34", "start_trial_35",
"start_trial_36", "start_trial_37", "start_trial_38", "start_trial_39",
"start_trial_4", "start_trial_40", "start_trial_41", "start_trial_42",
"start_trial_43", "start_trial_5", "start_trial_6", "start_trial_7",
"start_trial_8", "start_trial_9", "stop_consigne", "stop_trial_0",
"stop_trial_1", "stop_trial_10", "stop_trial_11", "stop_trial_12",
"stop_trial_13", "stop_trial_14", "stop_trial_15", "stop_trial_16",
"stop_trial_17", "stop_trial_18", "stop_trial_19", "stop_trial_2",
"stop_trial_20", "stop_trial_21", "stop_trial_22", "stop_trial_23",
"stop_trial_24", "stop_trial_25", "stop_trial_26", "stop_trial_27",
"stop_trial_28", "stop_trial_29", "stop_trial_3", "stop_trial_30",
"stop_trial_31", "stop_trial_32", "stop_trial_33", "stop_trial_34",
"stop_trial_35", "stop_trial_36", "stop_trial_37", "stop_trial_38",
"stop_trial_39", "stop_trial_4", "stop_trial_40", "stop_trial_41",
"stop_trial_42", "stop_trial_5", "stop_trial_6", "stop_trial_7",
"stop_trial_8", "stop_trial_9", "strat_1", "strat_2", "strat_4",
"val_0", "val_1"), class = "factor"), PS = c(NA, 904L, 906L,
838L, 805L, 789L, 797L, 876L, 924L, 928L, 964L, 957L, 935L, 861L,
834L, 856L, 846L, 811L, 825L, 869L, 904L, 936L, 969L, 965L, 1016L,
1018L, 1030L, 1015L, 999L, 987L, 1017L, 1064L, 1080L, 1061L,
1075L, 1046L, 1005L, 1014L, 1023L, 1040L, 1051L, 1046L, 1010L,
971L, 994L, 1071L, 1082L, 1120L, 1119L, 1044L, 1023L, 978L, 947L,
925L, 900L, 940L, NA, 963L, NA, 995L, 1013L, 1046L, 1005L, 1013L,
1043L, 1146L, 1205L, NA, NA, NA, NA, NA, NA, NA, NA, NA, 1306L,
1334L, 1285L, 1297L, 1257L, 1206L, 1206L, 1256L, 1252L, 1189L,
1254L, 1214L, 1203L, 1207L, 1263L, 1224L, 1235L, 1258L, 1210L,
1186L, 1201L, 1271L, 1246L, 1274L, 1337L, 1325L, 1551L, 1733L,
1812L, 1568L, NA, NA, NA, NA, NA, NA, NA, NA, NA, 1272L, 1218L,
1227L, 1165L, 1145L, 1192L, 1199L, 1208L, 1248L, 1280L, 1224L,
NA, NA, NA, NA, NA, NA, NA, NA, 1220L, NA, 1229L, 1250L, 1372L,
1102L, NA, NA, NA, NA, NA, NA, NA, NA, NA, 1141L, 1163L, 1146L,
1129L, 1190L, NA, NA, NA, NA, NA, NA, NA, NA, NA, 1182L, 1152L,
1134L, 1179L, 1178L, 1267L, NA, NA, NA, NA, NA, NA, NA, NA, NA,
1272L, 1186L, 1164L, 1173L, NA, NA, NA, NA, NA, NA, NA, NA, NA,
1265L, 1191L, 1109L, 1150L, 1125L, 1090L, 1139L, 1205L, NA, NA,
NA, NA, NA, NA, NA, NA, NA, 1277L, 1164L, 1122L, 1113L, 1115L,
1121L, 1168L, NA, NA, NA, NA, NA, NA, NA, NA, 1235L, NA, 1207L,
1164L, 1145L, 1177L, 1242L, 1224L, 1281L, NA, NA, NA, NA, NA,
NA, NA, NA, NA, 1234L, 1232L, 1204L, 1198L, 1108L, 1131L, 1220L,
1228L, 1227L, 1231L, 1299L, NA, NA, NA, NA, NA, NA, NA, NA, NA,
1211L, 1266L, 1294L, 1292L, 1129L, 1182L, 1175L, 1211L, 1233L,
1206L, 1185L, 1307L, 1209L, 1206L, NA, NA, NA, NA, NA, NA, NA,
NA, NA, 1245L, 1264L, 1283L, 1246L, 1290L, 1344L, 1311L, 1267L,
1201L, 1188L, 1164L, 1218L, 1188L, 1156L, 1144L, 1121L, 1145L,
1176L, 1155L, 1103L, NA, NA, NA, NA, NA, NA, NA, NA, NA, 1173L,
1223L, 1218L, 1170L, 1120L, 1084L, 1096L, 1092L, 985L, NA, NA,
NA, NA, NA, NA, NA, NA, NA, 1043L, 1092L, 1090L, 1126L, 1099L,
1125L, 1175L, 1099L, 1102L, 1188L, 1215L, 1225L, 1197L, 1268L,
NA, NA, NA, NA, NA, NA, NA, NA, NA, 1292L, 1338L, 1322L, 1284L,
1296L, 1273L, 1251L, 1216L, 1205L, 1200L, 1165L, 1097L, 1132L,
1209L, 1243L, 1295L, NA, NA, NA, NA, NA, NA, NA, NA, NA, 1288L,
1286L, 1243L, 1245L, 1215L, 1213L, 1215L, 1283L, 1280L, 1275L,
1334L, 1301L, 1205L, 1215L, 1267L, 1245L, 1203L, 1071L, 1113L,
1160L, 1211L, NA, NA, NA, NA, NA, NA, NA, NA, NA, 1243L, 1249L,
1268L, 1266L, 1299L, 1363L, 1215L, NA, NA, NA, NA, NA, NA, NA,
NA, NA, 938L, 831L, 929L, 999L, 1033L, 1090L, 1092L, 1094L, 1139L,
1144L, 1225L, 1203L, 1199L, 1261L, 1221L, 1230L, NA, NA, NA,
NA, NA, NA, NA, NA, NA, 1291L, 1308L, 1270L, 1250L, 1276L, 1226L,
1197L, 1201L, 1213L, 1195L, 1202L, 1201L, 1194L, 1192L, 1190L,
1206L, 1244L, 1203L, 1228L, 1239L, 1218L, 1218L, 1217L, 1218L,
1202L, 1224L, 1177L, 1134L, 1134L, 1152L, 1159L, 1162L, 1168L,
1107L, 1175L, 1200L, 1173L, 1203L, NA, NA, NA, NA, NA, NA, NA,
NA, NA, 1266L, 1278L, 1227L, 1188L, 1184L, 1178L, 1167L, 1194L,
1131L, 1166L, 1203L, 1211L, NA, NA, NA, NA, NA, NA, NA, NA, NA,
1223L, 1226L, 1218L, 1208L, 1142L, 1105L, 1122L, 1156L, NA, NA,
NA, NA, NA, NA, NA, NA, NA, 1118L, 1133L, 1150L, 1115L, 1070L,
1078L, 1145L, 1156L, 1175L, 1172L, 1129L, 1134L, 1089L, 1144L,
1171L, 1179L, 1195L, 1194L, 1231L, 1275L, 1250L, 1273L, 1268L,
1221L, 1245L, 1211L, 1195L, 1197L, 1194L, 1140L, 1168L, 1220L,
1197L, 1191L, 1240L, 1288L, NA, NA, NA, NA, NA, NA, NA, NA, NA,
1339L, 1327L, 1324L, 1320L, 1242L, 1231L, 1253L, 1255L, 1268L,
NA, NA, NA, NA, NA, NA, NA, NA, NA, 1297L, 1303L, 1282L, 1252L,
1200L, 1202L, 1191L, 1177L, 1220L, NA, NA, NA, NA, NA, NA, NA,
NA, NA, 1221L, 1224L, 1203L, 1162L, 1175L, 1187L, 1184L, 1165L,
NA, NA, NA, NA, NA, NA, NA, NA, NA, 1200L, 1225L, 1200L, 1205L,
1219L, NA, NA, NA, NA, NA, NA, NA, NA, NA, 1269L, 1209L, 1161L,
1171L, 1165L, 1140L, 1120L, 1127L, 1076L, 1081L, 1081L, 1114L,
NA, NA, NA, NA, NA, NA, NA, NA, NA, 1181L, 1186L, 1189L, 1200L,
1179L, 1186L, 1171L, 1134L, 1012L, 1004L, 1134L, 1090L, 1146L,
1222L, 1309L, 1334L, 1354L, NA, NA, NA, NA, NA, NA, NA, NA, NA,
1240L, 1121L, 1101L, 1104L, 1142L, 1157L, NA, NA, NA, NA, NA,
NA, NA, NA, NA, 1197L, 1264L, 1217L, 1181L, 1173L, 1160L, 1147L,
1174L, 1188L, 1183L, 1162L, 1188L, 1273L, NA, NA, NA, NA, NA,
NA, NA, NA, NA, 1303L, 1335L, 1346L, 1284L, 1227L, 1245L, 1295L,
1291L, 1284L, 1125L, 1176L, 1214L, 1206L, 1216L, 1232L, 1234L,
1268L, NA, NA, NA, NA, NA, NA, NA, NA, NA, 1326L, 1284L, 1265L,
1237L, 1206L, 1212L, 1197L, 1181L, 1216L, 1222L, 1205L, 1148L,
1163L, 1154L, 1138L, 1146L, NA, NA, NA, NA, NA, NA, NA, NA, NA,
1250L, 1229L, 1209L, 1199L, 1165L, 1191L, 1145L, 1130L, 1116L,
NA, NA, NA, NA, NA, NA, NA, NA, 1101L, NA, 1113L, 1126L, 1138L,
1160L, 1128L, NA, NA, NA, NA, NA, NA, NA, NA, NA, 1155L, 1132L,
1122L, 1146L, 1145L, 1146L, 1171L, 1103L, 1170L, 1136L, 1177L,
1108L, 1106L, NA, NA, NA, NA, NA, NA, NA, NA, NA, 1175L, 1192L,
1129L, 1163L, 1187L, 1177L, 1162L, 1184L, 1129L, NA, NA, NA,
NA, NA, NA, NA, NA, NA, 1221L, 1113L, 1089L, 1099L, 1022L, 995L,
947L, 1012L, 1065L, 1114L, NA, NA, NA, NA, NA, NA, NA, NA, NA,
1163L, 1094L, 1098L, 1139L, 1130L, 1117L, 1087L, 1084L, NA, NA,
NA, NA, NA, NA, NA, NA, NA, 1137L, 1145L, 1130L, 1105L, 1123L,
1112L, 1048L, 1055L, 1078L, 1147L, NA, NA, NA, NA, NA, NA, NA,
NA, NA, 1207L, 1164L, 1169L, 1188L, 1189L, 1140L, 1099L, 1178L,
NA, NA, NA, NA, NA, NA, NA, NA, 1208L, NA, 1258L, 1207L, 1158L,
1140L, 1099L, NA, NA, NA, NA, NA, NA, NA, NA, NA, 1123L, 1083L,
1043L, 1066L, 1082L, 1049L, 1040L, 1090L, 1112L, 1069L, 1079L,
1061L, 1029L, 1032L, 1046L, 1170L, 1197L, 956L, 941L, 1076L,
1136L, 1208L, 1213L, 1207L, 1186L, 1225L, 1222L, 1232L, 1169L,
1102L, 1144L, 1178L, 1218L, 1211L, 1229L, NA, NA, NA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", "36=32mod4",
"40=33mod8", "40=36mod2", "42=12mod6", "46=34mod6", "47=44mod2",
"50=20mod4", "55=20mod4", "57=15mod6", "58=52mod4", "59=57mod2",
"63=33mod4", "64=24mod8", "65=35mod6", "65=51mod6", "66=61mod6",
"68=26mod6", "71=21mod6", "71=31mod4", "74=53mod8", "77=53mod4",
"77=69mod2", "78=75mod4", "79=67mod6", "80=40mod4", "85=65mod4",
"86=50mod8", "89=32mod2", "89=35mod2", "89=49mod4", "90=50mod6",
"93=13mod8", "94=43mod4", "94=61mod4", "96=54mod4", "96=82mod6",
"97=75mod2", "98=76mod2", "99=85mod8", "99=91mod8", "99=93mod6"
), class = "factor")), class = "data.frame", row.names = c(NA,
-997L))````
Brian has offered a perfect approach to your problem. My approach was slightly different, yet with similar results. For the sake of completion and/or variety i am going to post it though.
My way of thinking is as follows:
You first read in your file and pass it into a dataframe df
library(dplyr) # load the libraries we are going to be using first
library(tidyr)
library(zoo)
df <- read.csv('~/Desktop/test', sep = ';', header = T) # I named your .txt file test here and put it on my Desktop
>df
Event Info Pupil.size
1 Message Start_trial_0 NA
2 Fixation L 1020
3 Fixation L 1200
4 Fixation L 980
5 Fixation L 990
6 Fixation L 1003
7 Message Trial_0 NA
8 Message ACC_0 NA
9 Message RT_850 NA
10 Message Stop_trial_0 NA
11 Message Start_trial_1 NA
12 Fixation L 1023
13 Fixation L 1020
14 Fixation L 997
15 Fixation L 1123
16 Message Trial_1 NA
17 Message ACC_1 NA
18 Message RT_920 NA
19 Message Stop_trial_1 NA
20 Message Strat_trial_2 NA
Then we create a new column, named trial where for every row on Info that has the trial info (the Start and Stop in this case), we pass the corresponding trial, otherwise we fill with NA, as such:
Option 1 (original file data):
df <- df %>% mutate(trial=ifelse(Event=='Message'&grepl('trial', df$Info), gsub('.*_(trial_\\d)$', '\\1', df$Info), NA))
Event Info Pupil.size trial
1 Message Start_trial_0 NA trial_0
2 Fixation L 1020 <NA>
3 Fixation L 1200 <NA>
4 Fixation L 980 <NA>
5 Fixation L 990 <NA>
6 Fixation L 1003 <NA>
7 Message Trial_0 NA <NA>
8 Message ACC_0 NA <NA>
9 Message RT_850 NA <NA>
10 Message Stop_trial_0 NA trial_0
11 Message Start_trial_1 NA trial_1
12 Fixation L 1023 <NA>
13 Fixation L 1020 <NA>
14 Fixation L 997 <NA>
15 Fixation L 1123 <NA>
16 Message Trial_1 NA <NA>
17 Message ACC_1 NA <NA>
18 Message RT_920 NA <NA>
19 Message Stop_trial_1 NA trial_1
20 Message Strat_trial_2 NA trial_2
Option 2 (new input file - keep in mind this preserves the in-between trial data that you might want to get rid of):
df <- df %>% mutate(trial=ifelse(Event=='MSG'&grepl('trial', df$Info), gsub('.*_(trial_\\d)$', '\\1', df$Info),
ifelse(Event=='MSG'&grepl('consigne', df$Info), gsub('.*_(consigne)$', '\\1', df$Info),
NA)))
I am filling with NA since on the next step we want to replace NAs with the earliest previous non NA value (thus assigning the correct trial on every row between the Start-Stop). This can be done with na.locf from the package zoo.
df$trial <- na.locf(df$trial)
> df
Event Info Pupil.size trial
1 Message Start_trial_0 NA trial_0
2 Fixation L 1020 trial_0
3 Fixation L 1200 trial_0
4 Fixation L 980 trial_0
5 Fixation L 990 trial_0
6 Fixation L 1003 trial_0
7 Message Trial_0 NA trial_0
8 Message ACC_0 NA trial_0
9 Message RT_850 NA trial_0
10 Message Stop_trial_0 NA trial_0
11 Message Start_trial_1 NA trial_1
12 Fixation L 1023 trial_1
13 Fixation L 1020 trial_1
14 Fixation L 997 trial_1
15 Fixation L 1123 trial_1
16 Message Trial_1 NA trial_1
17 Message ACC_1 NA trial_1
18 Message RT_920 NA trial_1
19 Message Stop_trial_1 NA trial_1
20 Message Strat_trial_2 NA trial_2
We can now get rid of the rows with Trial "metadata" on the Info column.
df <- df %>% filter(!grepl('[T,t]rial', df$Info))
Next, we need the final "metadata" information per trial, namely ACC and RT information. These information are all within the Info column so we have to pull them out somehow. To do that first, we create two new columns named ACC and RT.
df <- df %>% mutate(ACC=ifelse(grepl('ACC', df$Info), as.character(df$Info), NA),
RT=ifelse(grepl('RT', df$Info), as.character(df$Info), NA))
> df
Event Info Pupil.size trial ACC RT
1 Fixation L 1020 trial_0 <NA> <NA>
2 Fixation L 1200 trial_0 <NA> <NA>
3 Fixation L 980 trial_0 <NA> <NA>
4 Fixation L 990 trial_0 <NA> <NA>
5 Fixation L 1003 trial_0 <NA> <NA>
6 Message ACC_0 NA trial_0 ACC_0 <NA>
7 Message RT_850 NA trial_0 <NA> RT_850
8 Fixation L 1023 trial_1 <NA> <NA>
9 Fixation L 1020 trial_1 <NA> <NA>
10 Fixation L 997 trial_1 <NA> <NA>
11 Fixation L 1123 trial_1 <NA> <NA>
12 Message ACC_1 NA trial_1 ACC_1 <NA>
13 Message RT_920 NA trial_1 <NA> RT_920
We also need to make sure which ACC and RT attributes correspond to each trial. For that purpose we create two new small dataframes via dplyr that give us all the ACC and RT info.
infoACC <- df %>% group_by(trial, Info) %>% summarize() %>% filter(grepl('ACC', Info))
> infoACC
# A tibble: 2 x 2
# Groups: trial [2]
trial Info
<chr> <fct>
1 trial_0 " ACC_0"
2 trial_1 " ACC_1"
infoRT <- df %>% group_by(trial, Info) %>% summarize() %>% filter(grepl('RT', Info))
> infoRT
# A tibble: 2 x 2
# Groups: trial [2]
trial Info
<chr> <fct>
1 trial_0 " RT_850"
2 trial_1 " RT_920"
Then it's just a matter of joining our df and the two new dataframes to get the ACC and RT info in, dropping the additional columns and left-over rows (Message rows)
df <- left_join(left_join(df, infoACC, by='trial'), infoRT, by='trial') %>% select(-ACC, -RT) %>% filter(!Event=='Message')
And wrap this up with fixing up the column names.
colnames(df) <- c('Event', 'Info', 'Pupil.size', 'Trial', 'ACC', 'RT')
> df
Event Info Pupil.size Trial ACC RT
1 Fixation L 1020 trial_0 ACC_0 RT_850
2 Fixation L 1200 trial_0 ACC_0 RT_850
3 Fixation L 980 trial_0 ACC_0 RT_850
4 Fixation L 990 trial_0 ACC_0 RT_850
5 Fixation L 1003 trial_0 ACC_0 RT_850
6 Fixation L 1023 trial_1 ACC_1 RT_920
7 Fixation L 1020 trial_1 ACC_1 RT_920
8 Fixation L 997 trial_1 ACC_1 RT_920
9 Fixation L 1123 trial_1 ACC_1 RT_920
You can now save this as a new .csv or keep it as a dataframe for further operations in R.
I admit its a bit of a more complicated solution, but i wanted to offer my thinking process hoping to show you that there are many ways to approach your problems in R and you can tackle your questions in a stepwise manner.
Hope this helps
I managed to create a faceted boxplot with my 2 quantitative variables;
I know how to run a kruskal-wallis followed by a Wilcoxon test and show the significant differences with letters in the boxplot but only in a simple boxplot, with one variable and without facet. How can I do ?
(If possible, I would like to put the siginificant differences with letters, I wish I would be able to post the pictures of what I already done but apparently I'm not allowed)
Also, I have another question; Which test does the function stat_function_mean execute ? I tried to use this function, but I don't know how to use it... Here is my code without the test, only the facetted boxplot with my two variables :
Code for my facet boxplot with 2 measured variables ( FF and FM)
dat.m2 <- melt(pheno,id.vars=c("fusion","Genotype","Hormone"),
measure.vars=c('FF','MF'))
dat.m2$fusion<-factor(dat.m2$fusion, levels=c("Control", "CK 20 mg/L", "CK 100 mg/L", "CK 500 mg/L", "GA 20 mg/L", "GA 100 mg/L", "GA 500 mg/L"))
levels(dat.m2$fusion)
ggplot(dat.m2) +
geom_boxplot(aes(x=fusion, y=value, colour=variable))+
facet_wrap(~Genotype)+
xlab(" ")+
ylab("Days after sowing")
Code to add significant differences on the graph, with letters, but with only 1 measured variable (FF), without facet
mymat <-tri.to.squ(pp$p.value)
mymat
myletters <- multcompLetters(mymat,compare="<=",threshold=0.05,Letters=letters)
myletters
myletters_df <- data.frame(fusion=names(myletters$Letters),letter = myletters$Letters )
myletters_df
ggplot(pheno, aes(x=fusion, y=FF, colour=fusion))+
geom_boxplot()+
geom_text(data = myletters_df, aes(label = letter, y = 30 ), colour="black", size=5)+
ylab("Days after sowing")+
xlab("")+
labs(title="Days to female flower production")+
theme(plot.title = element_text(hjust = 0.5))+
> dput(pheno)
structure(list(Genotype = structure(c(2L, 2L, 2L, 2L, 2L, 2L,
2L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 3L, 3L, 3L, 3L, 3L, 3L,
3L, 3L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 2L, 2L, 2L, 2L, 2L, 2L,
2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 4L,
4L, 4L, 4L, 4L, 4L, 4L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 4L, 4L, 4L, 4L, 4L,
4L, 4L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 3L, 3L,
3L, 3L, 3L, 3L, 4L, 4L, 4L, 4L, 4L, 4L, 2L, 2L, 2L, 2L, 2L, 2L,
2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 4L,
4L, 4L, 4L, 4L, 4L, 4L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 4L, 4L, 4L, 4L, 4L,
4L, 4L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 3L, 3L,
3L, 3L, 3L, 3L, 4L, 4L, 4L, 4L, 4L, 4L), .Label = c("F1045",
"FF", "M1585", "M1610"), class = "factor"), X = structure(c(1L,
105L, 116L, 127L, 138L, 149L, 160L, 171L, 182L, 2L, 13L, 24L,
35L, 46L, 57L, 68L, 79L, 90L, 101L, 106L, 107L, 108L, 109L, 110L,
111L, 112L, 113L, 114L, 115L, 117L, 118L, 119L, 120L, 121L, 122L,
123L, 124L, 125L, 126L, 128L, 129L, 130L, 131L, 132L, 133L, 134L,
135L, 136L, 137L, 139L, 140L, 141L, 142L, 143L, 144L, 145L, 146L,
147L, 148L, 150L, 151L, 152L, 153L, 154L, 155L, 156L, 157L, 158L,
159L, 161L, 162L, 163L, 164L, 165L, 166L, 167L, 168L, 169L, 170L,
172L, 173L, 174L, 175L, 176L, 177L, 178L, 179L, 180L, 181L, 183L,
184L, 185L, 186L, 187L, 188L, 189L, 190L, 191L, 192L, 3L, 4L,
5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 14L, 15L, 16L, 17L, 18L, 19L,
20L, 21L, 22L, 23L, 25L, 26L, 27L, 28L, 29L, 30L, 31L, 32L, 33L,
34L, 36L, 37L, 38L, 39L, 40L, 41L, 42L, 43L, 44L, 45L, 47L, 48L,
49L, 50L, 51L, 52L, 53L, 54L, 55L, 56L, 58L, 59L, 60L, 61L, 62L,
63L, 64L, 65L, 66L, 67L, 69L, 70L, 71L, 72L, 73L, 74L, 75L, 76L,
77L, 78L, 80L, 81L, 82L, 83L, 84L, 85L, 86L, 87L, 88L, 89L, 91L,
92L, 93L, 94L, 95L, 96L, 97L, 98L, 99L, 100L, 102L, 103L, 104L
), .Label = c("H1", "H10", "H100", "H101", "H102", "H103", "H104",
"H105", "H106", "H107", "H108", "H109", "H11", "H110", "H111",
"H112", "H113", "H114", "H115", "H116", "H117", "H118", "H119",
"H12", "H120", "H121", "H122", "H123", "H124", "H125", "H126",
"H127", "H128", "H129", "H13", "H130", "H131", "H132", "H133",
"H134", "H135", "H136", "H137", "H138", "H139", "H14", "H140",
"H141", "H142", "H143", "H144", "H145", "H146", "H147", "H148",
"H149", "H15", "H150", "H151", "H152", "H153", "H154", "H155",
"H156", "H157", "H158", "H159", "H16", "H160", "H161", "H162",
"H163", "H164", "H165", "H166", "H167", "H168", "H169", "H17",
"H170", "H171", "H172", "H173", "H174", "H175", "H176", "H177",
"H178", "H179", "H18", "H180", "H181", "H182", "H183", "H184",
"H185", "H186", "H187", "H188", "H189", "H19", "H190", "H191",
"H192", "H2", "H20", "H21", "H22", "H23", "H24", "H25", "H26",
"H27", "H28", "H29", "H3", "H30", "H31", "H32", "H33", "H34",
"H35", "H36", "H37", "H38", "H39", "H4", "H40", "H41", "H42",
"H43", "H44", "H45", "H46", "H47", "H48", "H49", "H5", "H50",
"H51", "H52", "H53", "H54", "H55", "H56", "H57", "H58", "H59",
"H6", "H60", "H61", "H62", "H63", "H64", "H65", "H66", "H67",
"H68", "H69", "H7", "H70", "H71", "H72", "H73", "H74", "H75",
"H76", "H77", "H78", "H79", "H8", "H80", "H81", "H82", "H83",
"H84", "H85", "H86", "H87", "H88", "H89", "H9", "H90", "H91",
"H92", "H93", "H94", "H95", "H96", "H97", "H98", "H99"), class = "factor"),
Hormone = structure(c(2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 3L, 3L,
3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L,
3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L,
3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L,
3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L,
3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1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L, 3L, 3L, 3L, 3L, 3L,
3L, 3L, 3L, 3L, 3L, 8L, 4L, 6L, 6L, 6L, 4L, 3L, 4L, 4L, 3L,
4L, 3L, 3L, 3L, 3L, 6L, 6L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L,
3L, 4L, 3L, 4L, 3L, 3L, 3L, 4L, 3L, 6L, 6L, 8L, 6L, 4L, 4L,
4L, 8L, 4L, 4L, 2L, 3L, 3L, 3L, 3L, 6L, 3L, 5L, 4L, 5L, 5L,
4L, 3L), .Label = c("16-apr", "17-apr", "18-apr", "19-apr",
"21-mei", "23-apr", "26-apr", "30-apr"), class = "factor"),
ff = structure(c(14L, 20L, 4L, 10L, 20L, 3L, 1L, 14L, 9L,
11L, 20L, 11L, 9L, 9L, 9L, 11L, 12L, 12L, 6L, 12L, 12L, 16L,
12L, 12L, 17L, 17L, 12L, 16L, 17L, 18L, 12L, 6L, 20L, 20L,
15L, 15L, 15L, 20L, 20L, 11L, 11L, 11L, 9L, 9L, 9L, 9L, 20L,
20L, 20L, 4L, 1L, 4L, 4L, 4L, 8L, 20L, 4L, 20L, 12L, 4L,
14L, 14L, 11L, 11L, 15L, 15L, 11L, 11L, 9L, 15L, 9L, 9L,
11L, 11L, 14L, 1L, 5L, 4L, 4L, 20L, 20L, 20L, 20L, 20L, 20L,
20L, 20L, 20L, 15L, 15L, 14L, 13L, 15L, 15L, 11L, 9L, 9L,
11L, 9L, 11L, 1L, 20L, 1L, 20L, 20L, 20L, 20L, 1L, 1L, 4L,
20L, 20L, 20L, 15L, 15L, 14L, 15L, 1L, 15L, 15L, 20L, 11L,
11L, 11L, 11L, 15L, 10L, 10L, 16L, 10L, 12L, 10L, 17L, 8L,
16L, 12L, 8L, 4L, 4L, 8L, 20L, 10L, 1L, 20L, NA, 12L, 10L,
20L, 20L, 20L, 1L, 20L, 1L, 20L, 12L, 16L, 12L, 2L, 8L, 4L,
10L, 4L, 4L, 4L, 10L, 8L, 4L, 8L, 20L, 20L, 20L, NA, 20L,
1L, 20L, 1L, 8L, 20L, 1L, 1L, 7L, 17L, 19L, 19L, 12L, 10L,
12L, 19L, 10L, 10L, 10L, 17L), .Label = c("10-mei", "13-jun",
"14-apr", "14-mei", "17-mei", "18-jun", "21-jun", "21-mei",
"23-apr", "24-mei", "26-apr", "28-mei", "3-apr", "3-mei",
"30-apr", "31-mei", "4-jun", "5-jul", "7-jun", "7-mei"), class = "factor"),
FH = c(3.5, 6, 9, 16, 5.5, 12, 11.5, 4, 4.5, 6, 8, 5, 4.5,
3.5, 4, 5, 20, 42, 14, 40, 27, 42, 27, 26, 16, 18, 35, 17,
20, 28, 15, 20, 33, 32, 14.5, 14.5, 14.5, 35, 32, 12.5, 13.5,
12, 14.5, 12, 15, 14.5, 18, 18, 18.5, 35, 23, 25, 30, 37,
53, 27.5, 37, 25.5, 35, 47, 8.5, 20.5, 13, 14.5, 13.5, 18.5,
10.5, 10, 14.3, 18.5, 15.3, 11.7, 16, 15, 13.5, 26, 36, 30,
43, 23.5, 23.5, 31.5, 29, 30.5, 30, 29, 30, 24.5, 19, 23,
21.5, 26.5, 18.5, 20, 15, 12.3, 17, 12, 15, 13, 43614, 25,
27, 22.5, 35, 23.5, 30, 42, 42, 55, 32.5, 26, 26, 9.5, 4.5,
5.5, 5, 15.5, 10, 4.5, 8.5, 6, 5, 5.5, 5, 4.5, 30, 20, 16,
16, 20, 22, 30, 22, 25, 11, 13.5, 11, 11, 14, 6, NA, 5.5,
7, NA, 12, 14, 7, 9.5, 6.5, 9, 8.5, 12.5, 8, 27, 33, 35,
32, 17, 14, 22, 11, 17, 12, 25, 22, 15, 10, 5, 3, 4, NA,
5, 8, 4.5, 6, 7, 5, 5.5, 7, 42, 23, 23, 21, 14, 21, 17, 22,
19, 18, 17, 17), SRDT = structure(c(2L, 7L, 14L, NA, 7L,
8L, 7L, NA, NA, NA, 3L, NA, 18L, 15L, 17L, 17L, 18L, 18L,
NA, 18L, 15L, 17L, 15L, 20L, 2L, NA, 11L, 17L, 18L, 2L, 2L,
2L, 14L, 12L, 17L, 15L, 12L, 9L, 9L, 6L, 6L, 15L, 15L, 15L,
15L, NA, 17L, 15L, 10L, 11L, 11L, 10L, 11L, 17L, 5L, 21L,
6L, NA, 20L, 5L, 12L, 7L, NA, 17L, 17L, 15L, 15L, 10L, 10L,
6L, 10L, 10L, 21L, NA, 15L, 15L, 5L, 15L, 15L, 11L, 10L,
21L, 1L, 21L, 21L, 21L, 1L, 5L, 18L, 2L, 9L, 9L, NA, 12L,
10L, NA, 16L, 6L, 6L, 15L, 6L, 10L, 10L, 10L, 1L, 10L, 1L,
21L, 21L, 1L, 21L, 5L, 18L, 2L, 17L, 20L, 9L, 14L, 5L, 9L,
9L, 11L, NA, 18L, 10L, 18L, 20L, 4L, 9L, 7L, 2L, 2L, 7L,
5L, 17L, 17L, 11L, 10L, 12L, 2L, 14L, 19L, 19L, 19L, NA,
NA, 2L, 11L, 17L, 14L, 17L, 9L, 10L, 10L, 2L, 7L, 17L, 14L,
2L, 11L, 20L, 2L, 15L, 15L, 11L, 5L, NA, 10L, NA, 2L, 8L,
NA, NA, 14L, 5L, 15L, 15L, NA, 22L, NA, 9L, 9L, 19L, 9L,
9L, 22L, 20L, 13L, 7L, 20L, 15L, 20L), .Label = c("10-mei",
"11-jun", "13-jun", "13-mei", "14-mei", "17-mei", "18-jun",
"2-jul", "21-jun", "21-mei", "24-mei", "25-jun", "26-jun",
"28-jun", "28-mei", "3-mei", "31-mei", "4-jun", "5-jul",
"7-jun", "7-mei", "9-jul"), class = "factor"), MH = c(26,
50, 58, NA, 46, 58, 61, NA, NA, NA, 40, NA, 68, 48, 47, 42,
26, 50, NA, 48, 27, 42, 27, 48, 25, NA, 25, 17, 20, 18, 32,
19, 75, 75, 65, 70, 73, 73, 71, 65, 70, 60, 80, 70, 70, NA,
54, 45, 45, 45, 45, 40, 49, 53, 45, 27.5, 44, NA, NA, 47,
47, 62, NA, 75, 60, 75, 70, 65, 80, 67, 80, 75, 52, NA, 67,
68, 26, 55, 60, 60, 60, 31.5, 39, 30.5, 30, 29, 39, 39, 86,
74, 80, 76, NA, 69, 80, NA, 44, 70, 70, 65, 43, 60, 57, 57,
45, 60, 39, 35, 32.5, 27, 32.5, 43, 70, 75, 60, 66, 58, 48,
41, NA, 44, 42, NA, 44, 39, 40, 48, 53, 50, 50, 45, 45, 50,
13, 25, 11, 21, 20.5, 46, 44, 54, 25, 20, 25, NA, NA, 28,
33, 36, 40, 21, 36, 23.5, 21, 44, 60, 37, 37, 55, 24, 45,
45, 35, 30, 25, 12, 27, 10, NA, 53, 35, NA, NA, 43, 11, 13,
7, NA, 22, NA, 42, 46, NA, 41, 43, 40, 26, 45, 35, 29, 17,
22), SEEDT = structure(c(2L, 4L, 9L, NA, 4L, 5L, 4L, NA,
NA, NA, 4L, NA, 12L, 11L, 11L, 11L, 4L, 3L, NA, 4L, 15L,
4L, 8L, 5L, 7L, NA, 2L, 2L, 8L, 13L, 8L, NA, 13L, 8L, 15L,
15L, 8L, 7L, 7L, 10L, 10L, 11L, 6L, 10L, 10L, NA, 3L, 11L,
12L, 12L, 12L, 12L, 4L, 4L, 12L, 12L, 12L, NA, 9L, 12L, NA,
4L, NA, 2L, 15L, 2L, 15L, 14L, 10L, 12L, 12L, 11L, 11L, NA,
2L, 12L, 8L, 3L, 15L, 11L, 11L, 10L, 10L, 10L, 10L, 10L,
10L, 10L, 2L, 2L, 7L, 7L, NA, 8L, 10L, NA, 10L, 10L, 10L,
15L, 10L, 12L, 12L, 10L, 11L, 11L, 10L, 10L, 10L, 11L, 10L,
11L, 12L, 2L, 12L, 4L, 7L, 9L, 10L, 7L, 7L, 10L, NA, 12L,
10L, 15L, 2L, 4L, 8L, 8L, 4L, 4L, 13L, 12L, NA, NA, 4L, 7L,
NA, 7L, 13L, 13L, 13L, NA, NA, NA, 2L, 2L, NA, NA, NA, 8L,
NA, NA, 4L, 4L, 2L, NA, 4L, 2L, 7L, 7L, 7L, 2L, 2L, 15L,
1L, 15L, NA, 2L, 5L, NA, NA, 5L, 13L, NA, NA, NA, NA, NA,
16L, 16L, 13L, 16L, 7L, 1L, 7L, 16L, 7L, 7L, 7L, NA), .Label = c("11-jul",
"11-jun", "13-jun", "18-jun", "2-jul", "20-mei", "21-jun",
"25-jun", "28-jun", "28-mei", "31-mei", "4-jun", "5-jul",
"6-apr", "7-jun", "9-jul"), class = "factor"), FERMK = c(7L,
8L, 8L, 7L, 8L, 8L, 8L, 4L, NA, NA, 5L, 7L, 7L, 6L, 7L, 6L,
4L, 6L, NA, 4L, 3L, 4L, 4L, 4L, 2L, NA, 2L, 2L, 2L, 1L, 2L,
2L, 8L, 6L, 6L, 6L, 7L, 7L, 7L, 6L, 6L, 7L, 7L, 6L, 4L, 6L,
6L, 5L, 6L, 5L, 5L, 6L, 5L, 4L, 2L, 5L, NA, NA, 4L, 2L, 5L,
5L, NA, 7L, 7L, 8L, 6L, 6L, 7L, NA, 7L, 7L, 6L, 5L, 5L, 5L,
4L, 4L, 6L, 7L, 6L, 4L, 2L, 2L, 2L, 2L, 2L, 2L, 8L, 7L, 7L,
7L, 7L, 7L, 7L, NA, 7L, 7L, 7L, 7L, 5L, 5L, 4L, 5L, 6L, 4L,
6L, 2L, 2L, 2L, 5L, 4L, 7L, 6L, 8L, 7L, 6L, 6L, 8L, 7L, 7L,
7L, 7L, 7L, 7L, 7L, 7L, 5L, 5L, 4L, 4L, 4L, 4L, 2L, 2L, NA,
3L, 2L, NA, 3L, 6L, 5L, 5L, 6L, NA, 6L, 4L, 6L, 5L, 5L, 5L,
5L, 4L, 5L, 4L, 4L, 6L, 5L, 6L, 5L, 7L, 7L, 7L, 3L, 2L, 3L,
3L, 4L, NA, 5L, 5L, NA, 5L, 5L, 3L, 2L, 3L, NA, 4L, NA, 5L,
4L, 5L, 5L, 6L, 4L, 4L, 3L, 3L, 4L, 5L, NA), PLRMK = c(1L,
2L, 1L, 1L, 1L, 1L, 1L, NA, NA, NA, 1L, 2L, 0L, 0L, 0L, 0L,
1L, 1L, NA, 1L, 1L, 2L, 1L, 1L, 4L, NA, 5L, 5L, 4L, 5L, 3L,
4L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 1L, 1L, NA,
2L, 2L, 2L, 1L, 2L, 2L, 1L, 1L, 4L, 5L, NA, NA, 5L, 6L, 1L,
1L, NA, 1L, 1L, 0L, 1L, 1L, 1L, NA, 2L, 1L, 2L, NA, 2L, NA,
4L, 3L, 2L, 2L, 1L, 4L, 5L, 5L, 4L, 5L, 7L, 6L, 1L, 1L, 1L,
1L, NA, 1L, 2L, NA, 1L, 1L, 1L, 1L, 3L, 3L, 1L, 4L, 5L, 2L,
4L, 7L, 5L, 8L, 5L, 2L, 0L, 1L, 1L, 1L, 7L, 1L, 0L, 1L, 1L,
0L, 0L, 0L, 0L, NA, 2L, 3L, 1L, 1L, 2L, 1L, 2L, 6L, 6L, NA,
4L, 4L, NA, 2L, 2L, 1L, 1L, 1L, NA, 1L, 1L, 3L, 1L, 1L, 1L,
1L, NA, NA, 1L, 1L, 2L, 2L, 2L, 2L, 3L, 2L, 2L, 5L, 5L, 4L,
1L, 4L, NA, 2L, 1L, NA, NA, 2L, 2L, 0L, 0L, NA, 1L, NA, 4L,
2L, 1L, 2L, 1L, 2L, 4L, 1L, 2L, 4L, 3L, NA), FF = c(39L,
43L, 50L, 60L, 43L, 20L, 46L, 39L, 29L, 32L, 43L, 32L, 29L,
29L, 29L, 32L, 64L, 64L, 85L, 64L, 64L, 67L, 64L, 64L, 71L,
71L, 64L, 67L, 71L, 102L, 64L, 85L, 43L, 43L, 36L, 36L, 36L,
43L, 43L, 32L, 32L, 32L, 29L, 29L, 29L, 29L, 43L, 43L, 43L,
50L, 46L, 50L, 50L, 50L, 57L, 43L, 50L, 43L, 64L, 50L, 39L,
39L, 32L, 32L, 36L, 36L, 32L, 32L, 29L, 36L, 29L, 29L, 32L,
32L, 39L, 46L, 53L, 50L, 50L, 43L, 43L, 43L, 43L, 43L, 43L,
43L, 43L, 43L, 36L, 36L, 39L, 9L, 36L, 36L, 32L, 29L, 29L,
32L, 29L, 32L, 46L, 43L, 46L, 43L, 43L, 43L, 43L, 46L, 46L,
50L, 43L, 43L, 43L, 36L, 36L, 39L, 36L, 46L, 36L, 36L, 43L,
32L, 32L, 32L, 32L, 36L, 60L, 60L, 67L, 60L, 64L, 60L, 71L,
57L, 67L, 64L, 57L, 50L, 50L, 57L, 43L, 60L, 46L, 43L, NA,
64L, 60L, 43L, 43L, 43L, 46L, 43L, 46L, 43L, 64L, 67L, 64L,
80L, 57L, 50L, 60L, 50L, 50L, 50L, 60L, 57L, 50L, 57L, 43L,
43L, 43L, NA, 43L, 46L, 43L, 46L, 57L, 43L, 46L, 46L, 88L,
71L, 74L, 74L, 64L, 60L, 64L, 74L, 60L, 60L, 60L, 71L), MF = c(78L,
85L, 95L, NA, 85L, 99L, 85L, NA, NA, NA, 80L, NA, 71L, 64L,
67L, 67L, 71L, 71L, NA, 71L, 64L, 67L, 64L, 74L, 78L, NA,
60L, 67L, 71L, 78L, 78L, 78L, 95L, 92L, 67L, 64L, 92L, 88L,
88L, 53L, 53L, 64L, 64L, 64L, 64L, NA, 67L, 64L, 57L, 60L,
60L, 57L, 60L, 67L, 50L, 43L, 53L, NA, 74L, 50L, 92L, 85L,
NA, 67L, 67L, 64L, 64L, 57L, 57L, 53L, 57L, 57L, 43L, NA,
64L, 64L, 50L, 64L, 64L, 60L, 57L, 43L, 46L, 43L, 43L, 43L,
46L, 50L, 71L, 78L, 88L, 88L, NA, 92L, 57L, NA, 39L, 53L,
53L, 64L, 53L, 57L, 57L, 57L, 46L, 57L, 46L, 43L, 43L, 46L,
43L, 50L, 71L, 78L, 67L, 74L, 88L, 95L, 50L, 88L, 88L, 60L,
NA, 71L, 57L, 71L, 74L, 49L, 88L, 85L, 78L, 78L, 85L, 50L,
67L, 67L, 60L, 57L, 92L, 78L, 95L, 102L, 102L, 102L, NA,
NA, 78L, 60L, 67L, 95L, 67L, 88L, 57L, 57L, 78L, 85L, 67L,
95L, 78L, 60L, 74L, 78L, 64L, 64L, 60L, 50L, NA, 57L, NA,
78L, 99L, NA, NA, 95L, 50L, 64L, 64L, NA, 106L, NA, 88L,
88L, 102L, 88L, 88L, 106L, 74L, 93L, 85L, 74L, 64L, 74L),
speed = c(0.08974359, 0.139534884, 0.18, 0.266666667, 0.127906977,
0.6, 0.25, 0.102564103, 0.155172414, 0.1875, 0.186046512,
0.15625, 0.155172414, 0.120689655, 0.137931034, 0.15625,
0.3125, 0.65625, 0.164705882, 0.625, 0.421875, 0.626865672,
0.421875, 0.40625, 0.225352113, 0.253521127, 0.546875, 0.253731343,
0.281690141, 0.274509804, 0.234375, 0.235294118, 0.76744186,
0.744186047, 0.402777778, 0.402777778, 0.402777778, 0.813953488,
0.744186047, 0.390625, 0.421875, 0.375, 0.5, 0.413793103,
0.517241379, 0.5, 0.418604651, 0.418604651, 0.430232558,
0.7, 0.5, 0.5, 0.6, 0.74, 0.929824561, 0.639534884, 0.74,
0.593023256, 0.546875, 0.94, 0.217948718, 0.525641026, 0.40625,
0.453125, 0.375, 0.513888889, 0.328125, 0.3125, 0.493103448,
0.513888889, 0.527586207, 0.403448276, 0.5, 0.46875, 0.346153846,
0.565217391, 0.679245283, 0.6, 0.86, 0.546511628, 0.546511628,
0.73255814, 0.674418605, 0.709302326, 0.697674419, 0.674418605,
0.697674419, 0.569767442, 0.527777778, 0.638888889, 0.551282051,
2.944444444, 0.513888889, 0.555555556, 0.46875, 0.424137931,
0.586206897, 0.375, 0.517241379, 0.40625, 948.1304348, 0.581395349,
0.586956522, 0.523255814, 0.813953488, 0.546511628, 0.697674419,
0.913043478, 0.913043478, 1.1, 0.755813953, 0.604651163,
0.604651163, 0.263888889, 0.125, 0.141025641, 0.138888889,
0.336956522, 0.277777778, 0.125, 0.197674419, 0.1875, 0.15625,
0.171875, 0.15625, 0.125, 0.5, 0.333333333, 0.23880597, 0.266666667,
0.3125, 0.366666667, 0.422535211, 0.385964912, 0.373134328,
0.171875, 0.236842105, 0.22, 0.22, 0.245614035, 0.139534884,
NA, 0.119565217, 0.162790698, NA, 0.1875, 0.233333333, 0.162790698,
0.220930233, 0.151162791, 0.195652174, 0.197674419, 0.27173913,
0.186046512, 0.421875, 0.492537313, 0.546875, 0.4, 0.298245614,
0.28, 0.366666667, 0.22, 0.34, 0.24, 0.416666667, 0.385964912,
0.3, 0.175438596, 0.11627907, 0.069767442, 0.093023256, NA,
0.11627907, 0.173913043, 0.104651163, 0.130434783, 0.122807018,
0.11627907, 0.119565217, 0.152173913, 0.477272727, 0.323943662,
0.310810811, 0.283783784, 0.21875, 0.35, 0.265625, 0.297297297,
0.316666667, 0.3, 0.283333333, 0.23943662), ratiofm = c(7,
4, 8, 7, 8, 8, 8, NA, NA, NA, 5, 3.5, NA, NA, NA, NA, 4,
6, NA, 4, 3, 2, 4, 4, 0.5, NA, 0.4, 0.4, 0.5, 0.2, 0.666666667,
0.5, 8, 6, 6, 6, 7, 7, 7, 3, 3, 3.5, 3.5, 6, 4, NA, 3, 2.5,
3, 5, 2.5, 3, 5, 4, 0.5, 1, NA, NA, 0.8, 0.333333333, 5,
5, NA, 7, 7, NA, 6, 6, 7, NA, 3.5, 7, 3, NA, 2.5, NA, 1,
1.333333333, 3, 3.5, 6, 1, 0.4, 0.4, 0.5, 0.4, 0.285714286,
0.333333333, 8, 7, 7, 7, NA, 7, 3.5, NA, 7, 7, 7, 7, 1.666666667,
1.666666667, 4, 1.25, 1.2, 2, 1.5, 0.285714286, 0.4, 0.25,
1, 2, NA, 6, 8, 7, 0.857142857, 6, NA, 7, 7, NA, NA, NA,
NA, NA, 3.5, 1.666666667, 5, 4, 2, 4, 2, 0.333333333, 0.333333333,
NA, 0.75, 0.5, NA, 1.5, 3, 5, 5, 6, NA, 6, 4, 2, 5, 5, 5,
5, NA, NA, 4, 4, 3, 2.5, 3, 2.5, 2.333333333, 3.5, 3.5, 0.6,
0.4, 0.75, 3, 1, NA, 2.5, 5, NA, NA, 2.5, 1.5, NA, NA, NA,
4, NA, 1.25, 2, 5, 2.5, 6, 2, 1, 3, 1.5, 1, 1.666666667,
NA)), class = "data.frame", row.names = c(NA, -192L))
It would be more clear with pictures of my graphs, but apparently I'm not allowed yet to include pictures in my posts, sorry
Thanks in advance for your help
you can try
library(tidyverse)
df %>%
as_tibble() %>%
ggplot(aes(x=fusion, y=FF)) +
geom_boxplot(aes(colour=fusion))+
ggsignif::geom_signif(comparisons = combn(levels(df$fusion), 2, simplify = F), step_increase = 0.3) +
ggpubr::stat_compare_means() +
facet_wrap(~Genotype)+
xlab(" ")+
ylab("Days after sowing")