How to add more data to a spreadsheet using R?

Asked

Viewed 61 times

2

I am doing a work of Bioinformatics using patient data, each patient has a code and this work was divided among other colleagues also, each one got a part. Well, I need to attach the parts of them, which also have the code of the same patients before the data, together with my part but the codes do not follow an order, so this all mixed, would need that for example, Code rs39023 from my spreadsheet received code rs39023 from my colleagues' spreadsheet, a kind of mix but without mixing wrong data. There are approximately 1050 lines (1050 patients), which is very difficult to do in Ctrl+c Ctrl+v. I appreciate any help right now!

inserir a descrição da imagem aqui

  • you must be looking for left_join

  • however, your question is not very clear. put a sample of these databases that you are wanting to join. Or, if you can’t share it, create an example.

  • Here is an example of data I am using: https://drive.google.com/file/d/0B9xKCw_RPCnBRGhZWmlHWmlOZGs/view?usp=sharing

  • do not have access to google drive (corporate network) you can edit your question and put a part of the data?

  • I added it as a photo, I don’t know if it helps D: I tried to copy and paste directly, but it got totally messy

  • all files have the same format?

  • all have only the first column (SNP) equal, but not in that order! the other columns should be attached in the "main" file only in their proper SNP code. In this case, it would be like copying the 7 columns of the rs1000000 SNP and pasting into the main file on the row where the rs1000000 SNP is also, I don’t know if I could be clear D:

  • Read this answer: http://answall.com/a/124326/6036. I think this is exactly what you need.

  • I think that was it! I’ll break my head a little now to try to use! Thank you very much!

Show 4 more comments
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.