It worked! I will learn to use dput to provide data in the future post!
Appreciate a lot!
• 0 views
•
link
I extract a column from CSV containing geneName from geneOntology analysis. The result is a vector that contains several sub-vectors.
Now I want to make all elements into a single vector instead of a vector containing several vectors, what is the convenient way to do this?
Thank you,
it is difficult to help since you provide no copy/paste ready data, try
gsub(" ", "", unlist(sapply(strsplit(genes, split = ","), function(x)x)))
and if this does not work then please use dput to provide the data so we can reproduce things.
It worked! I will learn to use dput to provide data in the future post!
Appreciate a lot!
Log in to answer this question.
Data examples please, words alone are typically not sufficient.
In this case the genes contains 3 sub-vectors. How to fuse the 3 sub-vectors directly into 1?
Probably
unlist()I tried it. It works on list. I even tried to use as.list to transform the genes into a list and then do unlist. Still does not work
How about
Looks still not working.