argument is not numeric or logical: returning NA, in spite of

I want to summarize data and calculate the mean of each data.

 gene1 gene2 gene3
A 100.5 200.3 300
B 120.5 230 330.4
C  99.3 180.5 270
D 20.5 300.5 150.3

 tissue stage 
A leaf  cotyledon 
B leaf  cotyledon 
C leaf true 
D stem true

DF2 <- cbind(DF, inf)

tissue  stage gene1 gene2 gene3
A leaf  cotyledon 100.5 200.3 300
B leaf  cotyledon 120.5 230 330.4
C leaf true 99.3 180.5 270
D stem true 20.5 300.5 150.3

genes <- colnames(DF2[,-c(1,2))


$data <- DF2 %>% dplyr::group_by(stage, tissue) %>% 
  dplyr::summarise_each(funs(mean),all_of(genes)) %>% %>%
  mutate(sample_name = paste(!!!rlang::syms(c("stage", "tissue")), sep="-"))

1: In mean.default(gene1) : argument is not numeric or logical: returning NA

Although I modified the numbers and factors here because the row data is confidential, the form of the data frame is the same and I confirmed that is.numeric(DF)=TRUE with my data.
I also confirmed that this data contained no NA with
How can I solve this problem?
Thank you!

To begin, there is no variable tissue. Also, please see the FAQ: How to do a minimal reproducible example reprex for beginners.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.