'Error running pairwise_t_test in R: x data are essentially constant

I posted this question a few days ago with no luck, so here we go again:

I am trying to run a posthoc t-test on the following dataset:

data.type <- c("DNA","DNA","DNA","DNA","DNA","DNA","DNA","DNA","DNA","DNA","DNA","DNA","DNA","DNA","DNA","DNA","DNA","DNA","DNA","DNA","DNA","RNA","RNA","RNA","RNA","RNA","RNA","RNA","RNA","RNA","RNA","RNA","RNA","RNA","RNA","RNA","RNA","RNA","RNA","RNA","RNA","RNA")
hour <- c(1,1,1,2,2,2,24,24,24,48,48,48,96,96,96,168,168,168,672,672,672,1,1,1,2,2,2,24,24,24,48,48,48,96,96,96,168,168,168,672,672,672)
zotu.count <- c(11,14,16,7,16,15,5,14,13,6,5,17,7,7,12,3,4,5,3,5,4,2,3,2,1,6,2,1,1,1,1,0,0,1,1,4,1,1,1,6,7,6)
id <- c(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42)

However, I am getting the following error message when I run the code:

library(rstatix)
library(dplyr)
library(tidyr)
dataset %>% group_by(data.type) %>% pairwise_t_test(zotu.count ~ hour, paired = TRUE, p.adjust.method = "BH")

Error: Problem with mutate() column data. ℹ data = map(.data$data, .f, ...). x data are essentially constant

Does anyone know why this is happening and if so, how to get past it?

Thank you!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source