R error when trying to run ssGSEA
0
0
Entering edit mode
2.6 years ago
3129821299 • 0

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 • 1.2k views
ADD COMMENT
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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))
ADD REPLY
0
Entering edit mode

Use appropriate tags and a concise specific title. "Thank you" is not a tag and "R error" is a generic title. Read: https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1002202

I've fixed things for you this time.

ADD REPLY
0
Entering edit mode

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

ADD REPLY

Login before adding your answer.

Traffic: 2831 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6