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. Thank you a bunch for sharing this with all of us you really recognize what you are speaking approximately! Bookmarked. Kindly additionally consult with my web site =). We could have a hyperlink trade contract between us!

  2. The root of your writing while appearing agreeable at first, did not really work perfectly with me after some time. Someplace throughout the paragraphs you actually were able to make me a believer unfortunately only for a while. I nevertheless have a problem with your jumps in logic and you might do nicely to fill in all those gaps. If you can accomplish that, I would undoubtedly be amazed.

  3. Thanks for a marvelous posting! I truly enjoyed reading it, you will be a great author.I will be sure to bookmark your blog and definitely will come back sometime soon. I want to encourage continue your great work, have a nice evening!

  4. I like the helpful info you provide in your articles. I抣l bookmark your blog and check again here frequently. I’m quite sure I will learn a lot of new stuff right here! Best of luck for the next!

  5. Appreciating the persistence you put into your site and in depth information you present. It’s good to come across a blog every once in a while that isn’t the same old rehashed information. Excellent read! I’ve saved your site and I’m including your RSS feeds to my Google account.

  6. I like the helpful information you provide in your articles. I抣l bookmark your weblog and check again here frequently. I am quite certain I will learn many new stuff right here! Good luck for the next!

  7. whoah this blog is excellent i love reading your posts. Stay up the great work! You realize, a lot of people are hunting around for this info, you can help them greatly.

  8. One thing I’d prefer to say is that often before getting more computer memory, have a look at the machine directly into which it is installed. When the machine will be running Windows XP, for instance, a memory ceiling is 3.25GB. Installing over this would just constitute a waste. Make sure that one’s motherboard can handle an upgrade quantity, as well. Good blog post.

  9. There are certainly a variety of details like that to take into consideration. That may be a great point to carry up. I provide the ideas above as basic inspiration however clearly there are questions like the one you convey up where crucial thing might be working in trustworthy good faith. I don?t know if greatest practices have emerged around issues like that, but I am sure that your job is clearly recognized as a fair game. Both boys and girls feel the affect of just a second抯 pleasure, for the remainder of their lives.

  10. Have you ever thought about including a little bit more than just your articles? I mean, what you say is fundamental and everything. However imagine if you added some great photos or videos to give your posts more, “pop”! Your content is excellent but with images and videos, this blog could definitely be one of the very best in its niche. Fantastic blog!

  11. I cling on to listening to the reports talk about receiving boundless online grant applications so I have been looking around for the most excellent site to get one. Could you tell me please, where could i find some?

  12. I know this if off topic but I’m looking into starting my own blog and was curious what all is required to get setup? I’m assuming having a blog like yours would cost a pretty penny? I’m not very web savvy so I’m not 100 certain. Any tips or advice would be greatly appreciated. Kudos

  13. Thank you for the auspicious writeup. It in fact was once a enjoyment account it. Look advanced to more delivered agreeable from you! However, how can we keep in touch?

  14. Very good blog you have here but I was wondering if you knew of any forums that cover the same topics talked about here? I’d really like to be a part of community where I can get comments from other experienced people that share the same interest. If you have any recommendations, please let me know. Thanks a lot!

  15. Hello my friend! I want to say that this article is amazing, nice written and include almost all vital infos. I抎 like to see more posts like this.

  16. When I originally commented I clicked the “Notify me when new comments are added” checkbox and now each time a comment is added I get several emails with the same comment. Is there any way you can remove people from that service? Bless you!

  17. Hello there! This is kind of off topic but I need some help from an established blog. Is it tough to set up your own blog? I’m not very techincal but I can figure things out pretty fast. I’m thinking about setting up my own but I’m not sure where to start. Do you have any tips or suggestions? Thanks

  18. Awesome website you have here but I was wondering if you knew of any community forums that cover the same topics talked about here? I’d really love to be a part of online community where I can get comments from other experienced individuals that share the same interest. If you have any recommendations, please let me know. Cheers!

  19. Every weekend i used to go to see this website, as i want
    enjoyment, since this this web page conations actually
    fastidious funny material too.

  20. Hi it’s me, I am also visiting this web page daily, this web page is actually good and the users are actually sharing
    good thoughts.

  21. I’m not sure why but this blog 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 on and see if the problem still exists.

  22. With every thing that seems to be developing throughout this particular subject material, your viewpoints are actually fairly radical. Even so, I beg your pardon, but I do not give credence to your whole plan, all be it exciting none the less. It seems to everyone that your opinions are not totally validated and in fact you are your self not thoroughly confident of the point. In any case I did enjoy looking at it.

  23. It’s a shame you don’t have a donate button! I’d certainly donate to this fantastic blog!
    I suppose for now i’ll settle for book-marking and adding your RSS feed to
    my Google account. I look forward to fresh updates and will talk about this website with my Facebook group.
    Chat soon!

  24. What’s Going down i am new to this, I stumbled upon this I have found It absolutely helpful and it has aided
    me out loads. I hope to give a contribution & help different users like its helped me.

    Great job.

  25. Nice post. I learn something totally new and challenging on sites I stumbleupon every day.
    It’s always exciting to read through content from other authors and practice
    something from their websites.

  26. This paragraph offers clear idea for the new visitors of blogging, that truly how
    to do running a blog.

  27. Hey there! I simply would like to give you
    a big thumbs up for your great info you have here on this post.

    I am coming back to your site for more soon.

  28. I have been surfing online greater than three hours as of late, yet I never found any attention-grabbing article like yours.

    It is pretty price sufficient for me. In my opinion, if all webmasters and
    bloggers made good content material as you probably did, the net can be much more useful than ever before.

  29. We stumbled over here different web address and thought I should check things out.
    I like what I see so now i am following you. Look forward to checking out your web page again.

  30. Superb blog! Do you have any hints for aspiring writers?
    I’m hoping to start my own website soon but I’m a little lost on everything.
    Would you advise starting with a free platform like WordPress or go
    for a paid option? There are so many choices out there that I’m totally confused ..
    Any suggestions? Kudos!

  31. Generally I don’t learn article on blogs, but I wish to say that this write-up very pressured me to
    take a look at and do it! Your writing taste has been amazed me.

    Thanks, very great article.

  32. It’s awesome in favor of me to have a web page, which is valuable
    for my experience. thanks admin

  33. It is perfect time to make some plans for the future and it’s time to be happy.

    I have read this post and if I could I want to
    suggest you few interesting things or advice.

    Maybe you could write next articles referring to this article.
    I wish to read more things about it!

  34. Tremendous things here. I’m very satisfied to peer your post.
    Thanks a lot and I’m taking a look forward to touch you.
    Will you kindly drop me a e-mail?

  35. Thanks , I’ve recently been looking for info
    about this topic for a long time and yours is the greatest I have found out till now.
    However, what about the bottom line? Are you sure about the supply?

  36. I’m amazed, I have to admit. Seldom do I come across a blog that’s both equally
    educative and engaging, and let me tell you, you
    have hit the nail on the head. The problem is something too few folks are speaking intelligently about.
    I’m very happy that I found this during my hunt for something relating to this.

  37. Great beat ! I wish to apprentice while you amend your web
    site, how could i subscribe for a blog web site? The account aided me a acceptable deal.
    I had been tiny bit acquainted of this your broadcast provided bright clear concept

  38. If some one desires to be updated with most recent
    technologies therefore he must be pay a visit this web site and be up to date all the time.

  39. hi!,I love your writing very a lot! percentage we keep in touch extra about your post
    on AOL? I need an expert on this area to solve my problem.
    May be that is you! Taking a look forward to peer you.

  40. Howdy! This is my 1st comment here so I just wanted to give a quick shout out and tell you I truly enjoy reading through
    your posts. Can you suggest any other blogs/websites/forums that go over the same subjects?
    Thanks!

  41. After looking at a few of the blog articles on your site, I really
    appreciate your technique of blogging. I book marked it to my bookmark
    webpage list and will be checking back soon. Take a look at my web site as
    well and let me know how you feel.

  42. I always used to read post in news papers but now as I am
    a user of net therefore from now I am using net for posts, thanks to web.

  43. Hey! I just wanted to ask if you ever have any problems with hackers?
    My last blog (wordpress) was hacked and I ended up losing a few months of hard work due to no backup.
    Do you have any solutions to prevent hackers?

  44. Magnificent goods from you, man. I’ve understand
    your stuff previous to and you are just too excellent. I really like what you’ve acquired here,
    certainly like what you’re stating and the way in which you say it.
    You make it enjoyable and you still care for to keep it sensible.
    I can not wait to read far more from you. This is actually a terrific site.

  45. I was wondering if you ever thought of changing the
    layout of your website? Its very well written; I love what
    youve got to say. But maybe you could a little more in the
    way of content so people could connect with it better. Youve got an awful lot of text for only
    having one or 2 images. Maybe you could space it out better?

Leave a Reply

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