Dear Sean,
it works perfectly. big thank for your kind help and thank to galaxy too.
Kind Regards,
synat
• 0 views
•
link
Dear All,
It might be a naive question, but I got stuck a bit. How could I read csv file into R and make the gene column had no label like the picture in attached. everytime I read my data in, the label is still there.
thank in advance.
regards,
synat
I'm going to interpret your question a bit. I'm assuming here that you just want to convert your data.frame to a matrix.
# create a matrix from the data.frame
mat2 = as.matrix(mat[,-1])
# add rownames to the matrix
rownames(mat2) = mat[,1]
# show the matrix with genes as rownames
mat2
Note that if the "genes" column has duplicates, this won't work as expected since rownames must be unique.
Dear Sean,
it works perfectly. big thank for your kind help and thank to galaxy too.
Kind Regards,
synat
Log in to answer this question.
colnames(mat) = NULLDear galaxy,
thank for your response.
i have dataframe called ifn
I just need to hide one column in my dataframe, which are genes I used the following code
Attached image is my dataframe
Kind Regards,
Synat