This is a test version of Biostars. For the public version, visit https://www.biostars.org.
R error when trying to run ssGSEA

I encounter a problem when I run ssGSEA by R. I wish to run it successfully. Could any kind person help me?

enter image description here

enter image description here

ssgsea r

Have you tried case.when(as.vector(p) < 0.01 ...)?

Thanks for your reply.

However I still got an error after applying the codes you have provided. Fortunately, I reset my codes,and it successfully runs. I think the reason is that the function (case_when) wants to deal with a vector, but what I give is a matrix of 28*2.

The change:

tmp = matrix(case_when(
  p[,1] < 0.001 ~ "***",
  p[,1] < 0.01 ~ "**",
  p[,1] < 0.05 ~ "*",
  TRUE ~ ""
), nrow = nrow(p),ncol = ncol(p))

Sorry,It's the first time I write a question and reply. I will pay more attention to it.Thanks you very much!

0 answers

No answers yet.

Log in to answer this question.