0

I don't understand what I am doing wrong:

I would like to test for pairwise differences in my data:

leber_test <- structure(list(ID = c("TG5", "YLG22", "SR3", "KBU15", "YGL31", 
"TG6", "KBO21", "KBU15", "YLG19", "FB9"), sub_group = structure(c(2L, 
2L, 2L, 1L, 2L, 2L, 2L, 1L, 2L, 1L), .Label = c("bullhead", "salmonid"
), class = "factor"), taxa = c("salmo.trutta", "oncorhynchus.mykiss", 
"salmo.trutta", "cottus.gobio", "oncorhynchus.mykiss", "salmo.trutta", 
"oncorhynchus.mykiss", "cottus.gobio", "oncorhynchus.mykiss", 
"cottus.gobio"), sampling.site = c("tagles.unten", "ybbs.lunz.grossau", 
"oberer.seebach.ritrodat", "kothbergbach.unten", "ybbs.goestling.lagerhaus", 
"tagles.unten", "kothbergbach.oben", "kothbergbach.unten", "ybbs.lunz.grossau", 
"faltlbach"), body_weight_g = c(42L, 90L, 28L, 4L, 8L, 12L, 114L, 
4L, 8L, 8L), PUFA = structure(c(4L, 4L, 3L, 3L, 2L, 4L, 2L, 2L, 
4L, 2L), .Label = c("ARA.d13C", "DHA.d13C", "EPA.d13C", "SDA.d13C"
), class = "factor"), organ = structure(c(3L, 3L, 3L, 2L, 2L, 
4L, 3L, 2L, 4L, 1L), .Label = c("brain", "eyes", "liver", "muscle"
), class = "factor"), isotopic_value = c(-44.1939957, -40.5251836, 
-37.1761553, -41.0635951, -37.9701763, -45.4970603, -39.6735145, 
-41.4812719, -44.3169058, -43.649058)), row.names = c(500L, 535L, 
470L, 180L, 243L, 368L, 437L, 183L, 393L, 24L), class = "data.frame")

leber_test %>%
  group_by(PUFA,sub_group) %>%
  pairwise_t_test(isotopic_value ~ organ, paired = TRUE, 
    p.adjust.method = "bonferroni")

Error message is as follows: Error in app$vspace(new_style$margin-top %||% 0) : attempt to apply non-function

I think I don't know how to tell the command on which ID/individual case it should base its analysis on. How can I compare them individually and paired? It does not even work, when I use "ID" for group_by

Nadiine El Nino
  • 339
  • 1
  • 6

0 Answers0