ich möchte in einem Datensatz die Mittelwerte berechnen und bekomme folgende Fehlermeldung:
Code: Alles auswählen
Error in mean.default(ratio.all.named.withoutNA$`Ratio P1`, ratio.all.named.withoutNA$`Ratio P2`, :
'trim' muss nummerisch sein und Länge 1 haben
In addition: Warning message:
In if (na.rm) x <- x[!is.na(x)] :
the condition has length > 1 and only the first element will be used
Code: Alles auswählen
> ratio.all.named.withoutNA <- na.omit(ratio.all.named)
R scheint das Löschen der NA Werte gespeichert zu haben.
Code: Alles auswählen
> str(ratio.all.named.withoutNA)
'data.frame': 30404 obs. of 8 variables:
$ Primary.Sequence.Name: Factor w/ 22071 levels "","A1BG","A1BG-AS1",..: 19237 18476 19855 367 15346 3589 1448 18171 7332 522 ...
$ Ratio P1 : num 1.651 0.957 1.2 1.082 0.935 ...
$ Ratio P2 : num 1.48 1.24 1.07 1.08 1.19 ...
$ Ratio P3 : num 1.635 1.118 1.172 1.191 0.975 ...
$ Ratio M1 : num 1.437 1.126 1.099 0.929 1.249 ...
$ Ratio M2 : num 1.38 1.14 1.05 1 1.07 ...
$ Ratio Q1 : num 0.597 0.957 1.153 0.643 0.961 ...
$ Ratio Q2 : num 1.323 0.996 1.123 0.96 0.785 ...
- attr(*, "na.action")=Class 'omit' Named int [1:32] 840 844 1711 3316 3388 3489 5145 5216 6017 7097 ...
.. ..- attr(*, "names")= chr [1:32] "885" "889" "1775" "3396" ...
Könnt ihr mir sagen was ich falsch mache?
VG
wbart