Entering edit mode
7.4 years ago
saj98
▴
140
Hello every one
I have two CSV files from different RNA seq data, I like to do scatter plot to study the similarity between both experiments. I do not know how to plot two different variables from two different files. Do you have any suggestion or idea how to plot two different data sets? Thanks for help
Hi, do the data have the same length? If you import the data with data1 = read.csv() and data2 = read.csv(), can't you then do:
plot(data1$variable1, data2$variable2)
? C.
Yes the data frame is similar, but the labels are different between the two files. The first experiment done on cells and the second experiment done on tissue. I did what you asked me so I got this error plot(G$AF.Cell, G1$AF.tissue) Error in xy.coords(x, y, xlabel, ylabel, log) : 'x' and 'y' lengths differ
So you know where the error is then? Could you post the code you've used to fix the problem, please
Sure, I am pasting it
Sorry, could you post it in your initial question and format it. Please indicate which of those columns could be used to match rows in one dataset with rows in the other, and I might be able to help you
You need a gene-level average before you can compare the results in one dataset with the results in the other, which is unfortunate, since if you had at most one entry for each gene, it would be a simple case of
merge
withby.x="gene"
,by.y="geneNames"
thenplot
.I added markup to your post for increased readability. You can do this by selecting the text and clicking the 101010 button. When you compose or edit a post that button is in your toolbar, see image below:
I think ther's a swirl tutorial on base R graphics in the R Programming course see here