Is their a way to convert an enrichlist from CBNplot into a dataframe, so I can use the the function bngeneplotCustom ?
https://github.com/noriakis/CBNplot
You can get the 'information' from an enrichlist as a dataframe using e.g.
e_list <- enrichKO(data)
enrichlist_df <- e_list#result
NB. the bngeneplotCustom() function appears to require the enrichlist object, not just a dataframe of the results. If this answers your question but doesn't solve your problem, and you need more help troubleshooting, please edit your question to include the code you've tried and any error messages or other info that might help. Please see https://stackoverflow.com/help/how-to-ask / https://stackoverflow.com/help/minimal-reproducible-example / How to make a great R reproducible example for more info on asking 'good' questions, and/or ask the folks at https://bioinformatics.stackexchange.com/ as they are likely more knowledgeable on this topic.
Related
I recently just started with R a few weeks ago at the Uni. We were given a problem which we had to solve. However in this problem, I find that there are two answers that fit the question:
Verify that you created lo_heval correctly (incl. missing values). Store your verification in the object proof2.
So i find this is correct:
proof2 <- soep[1:100, c("heval", "lo_heval")]
But I think that this answer is also correct:
proof2 <- table(soep$heval, soep$lo_heval, useNA = "always")
Instead of having to decide for one answer, how do I combine them both into the object? I tried to use &, but I get an error. I may be using it wrong.
Prof. if you're seeing this, please don't fail me. I just can't decide between them.
Thanks in advance!
R lists can hold any arbitrary objects in them, so you could use
proof2 <- list(
soep[1:100, c("heval", "lo_heval")],
table(soep$heval, soep$lo_heval, useNA = "always")
)
However, to my mind 100 rows of two columns isn't proof - it's an exercise to look through those and verify things are right. (And what about the rows past 100? It's a decent spot check, but if there are more rows in the data it is more strong evidence than proof.) The table approach, on the other hand, seems succinct and effective.
Encountered this when using openTSDB and I want to make sure I'm using the right function.
Difference of sum and zimsum is described here: http://opentsdb.net/docs/build/html/user_guide/query/aggregators.html
zimsum is suppose to add the data points together and fill zero if missing. I supposed 1m-zimsum and 1m-zimsum-zero should return same results. I have a single data logged in openTSDB once at 2 AM. I got a dot with 1m-zimsum but a line with 1m-zimsum-zero. Could anyone kindly explain?
I'm not super familiar with statistics and openTSDB. Please forgive me if stupid question is asked.
I was reading a question in SO and came up with the !! operator. Ive been working with R for some time and never have seen it. First, Ive search for questions about it, and couldnt find one in SO (so this may be a duplicate). Also, go back to diferent R operators post and pages, and no one says anything of it.
In the question, the !! preceded an R oject, like:
> !!object
Thanks for the help.
P.D.: If its a duplicate, please close.
everyone
I brought some new trivial questions to ask. I've searched, but I failed to look for the most efficient answer.
The string(or list) I would like to make looks like:
c("who","expr1","who","expr2",...,"who","expr100")
How can I efficiently make this string using loop(or another function) in R?
Thank you~!!
At least this is one choice:
c(rbind("who", paste0("expr", 1:100)))
I have a couple of questions as I am new to this.
How can I read in data using \-\- to look for missing values?
How can I determine how many values are missing in each variable?
I tried using the summary command and is.na but can't's seem to get it right.
the first question is not clear, for the second one you can use
sapply(yourdataframe, function(x) sum(is.na(x))