Merging and Cleaning the data using R

R is a suitable option to build out of data oriented problems and create a suitable solution irrespective of your coding or business skills.

While using the tool I always make sure to understand the business requirement, the data orientation and plot my need accordingly.

Here is an example of how you can

1.    Merge two datasets

2.    Remove the unwanted columns of the data

Easy and very useful when you are parsing data or scraping data for building clean data frames.

Merging Data libraries

#code

oldAddr = read.csv(

file=”file1.csv”,

header=TRUE,

sep=”,”

)

newAddr = read.csv(

file=”file2.csv”,

header=TRUE,

sep=”|”

)

Removing the unwanted columns

#code

mydata <- merge(oldAddr, newAddr, by=c(“Name”))

mydata[6:8] <- list(NULL)

write.csv(mydata, “mydata.csv”)

You will find the try data on our Github repository

Feedback and questions are always welcome! Enjoy with R

68 comments on “Merging and Cleaning the data using R

  1. There’s definately a lot to find out about this issue.
    I love all the points you’ve made.

  2. My partner and I absolutely love your blog and find many
    of your post’s to be exactly I’m looking for.
    Would you offer guest writers to write content for
    you personally? I wouldn’t mind writing a post or
    elaborating on some of the subjects you write
    with regards to here. Again, awesome web site!

  3. Hi there, after reading this awesome paragraph i am as well glad to share my experience here with friends.

  4. We stumbled over here coming from a different website and
    thought I might check things out. I like what I see so i am just following you.
    Look forward to exploring your web page yet again.

  5. It’s impressive that you are getting ideas from this post
    as well as from our argument made at this time.

  6. Hi are using WordPress for your blog platform? I’m new to the blog world but I’m trying to get started and create my own. Do you require any coding knowledge to make your own blog?
    Any help would be really appreciated!

  7. Excellent site you’ve got here.. It’s difficult to find high quality writing like yours nowadays.
    I seriously appreciate people like you! Take care!!

  8. I have read several good stuff here. Definitely value bookmarking for
    revisiting. I wonder how much attempt you place to make any such excellent informative website.

  9. I’m not sure exactly why but this web site is loading very slow
    for me. Is anyone else having this problem or is
    it a problem on my end? I’ll check back later and see if the problem still exists.

  10. I was excited to uncover this web site. I want to to thank you for ones time due to this fantastic read!!

    I definitely savored every bit of it and i also have you
    saved to fav to check out new things on your blog.

  11. Awesome! Its really remarkable article, I have got much clear idea regarding from this article.

  12. Hi! I could have sworn I’ve been to this website before but after looking at many
    of the articles I realized it’s new to me. Anyways,
    I’m certainly happy I found it and I’ll be bookmarking it
    and checking back regularly!

  13. Hey there, I think your blog might be having browser compatibility issues.

    When I look at your website in Firefox, it looks fine but
    when opening in Internet Explorer, it has some overlapping.
    I just wanted to give you a quick heads up!
    Other then that, amazing blog!

  14. I used to be recommended this web site by my cousin. I am not certain whether or not
    this post is written by him as nobody else know such particular approximately my problem.

    You’re incredible! Thank you!

  15. Excellent web site you’ve got here.. It’s difficult to find high-quality writing like yours nowadays.
    I truly appreciate people like you! Take care!!

  16. Thanks for your ideas. One thing I have noticed is the fact that banks along with financial institutions are aware of the spending habits of consumers and understand that plenty of people max out their cards around the getaways. They smartly take advantage of this particular fact and begin flooding ones inbox plus snail-mail box with hundreds of 0 APR card offers right after the holiday season ends. Knowing that when you are like 98 of all American public, you’ll hop at the one opportunity to consolidate consumer credit card debt and transfer balances for 0 interest rate credit cards.

  17. Wow, amazing blog layout! How long have you been blogging for? you make blogging look easy. The overall look of your website is great, let alone the content!

Leave a Reply

Your email address will not be published. Required fields are marked *