dx <- data.frame(CMPD = c("cmpd1","cmpd1","cmpd1","cmpd1","cmpd2","cmpd2",
"cmpd2","cmpd2","cmpd3","cmpd3","cmpd3","cmpd3"),
MRM = c("309.0/121.1","309.0/121.1","309.0/90.1",
"309.0/90.1","305.2/140.3","305.2/140.3","300.5/107.3",
"300.5/107.3","404.8/126.0","404.8/126.0","401.5/91.0",
"401.5/91.0"),
RESP = c(123.4,234.5,345.6,456.7,567.8,678.9,789.0,12.4,
23.5,34.6,45.7,56.8))
-
>dx
CMPD MRM RESP
1 cmpd1 309.0/121.1 123.4
2 cmpd1 309.0/121.1 234.5
3 cmpd1 309.0/90.1 345.6
4 cmpd1 309.0/90.1 456.7
5 cmpd2 305.2/140.3 567.8
6 cmpd2 305.2/140.3 678.9
7 cmpd2 300.5/107.3 789.0
8 cmpd2 300.5/107.3 12.4
9 cmpd3 404.8/126.0 23.5
10 cmpd3 404.8/126.0 34.6
11 cmpd3 401.5/91.0 45.7
12 cmpd3 401.5/91.0 56.8
Я хотел бы иметь возможность работать с этими данными на основе уникальности комбинации CMPD
и MRM
(например, строки 1, 2, затем строки3, 4 и т. Д.)