Merging and Cleaning the data using R

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

Dr Ved P Mishra

PhD in Network Security, Head - Center of Excellence (AI Data Science & Future Intelligent Systems), Program Leader - Computer Science, Senior Member-IEEE, Conference Chair - ICCIKE(Conference Series)

7 年

Good one Anshika...Happy to read this...God bless you.

要查看或添加评论,请登录

Anshika (un-shi-ka) Agarwal的更多文章

  • How to catch the tail ?

    How to catch the tail ?

    Working on data analysis, predictive analytics, strategy modelling or product management. In today’s digital ecosphere…

    1 条评论
  • ALIENS of the online world?

    ALIENS of the online world?

    Digital Presence in form of websites and online presence provides substantial bot activities. Bots can be helpful for…

  • Native Apps vs Hybrid Apps (uno)

    Native Apps vs Hybrid Apps (uno)

    Mobile usage as seeing an incessant push since last few years. To trust the statistics, it up at 52% with respect to…

  • Shoe that fit all sizes

    Shoe that fit all sizes

    I can’t carry my desktop or my laptop in an #Uber but still want to shop that crazy hat for the next pool party. Ouch –…

  • GDPR - "the elephant in the room"

    GDPR - "the elephant in the room"

    Facts about GDPR ?What is GDPR? The General Data Protection Regulation (GDPR) ensures that people’s data is protected…

  • Questionable ? Difference between Data Analytics and Business Intelligence

    Questionable ? Difference between Data Analytics and Business Intelligence

    Data Analytics This helps in building essential data capturing architecture for future forecasted and how to do it or…

    1 条评论
  • "Caught My Eye" - Let's talk about "Content Writing"

    "Caught My Eye" - Let's talk about "Content Writing"

    Quick tips to write that blog you have been thinking about for quite sometime now or writing a product description or…

  • Data Scientist VS Data Analyst - A very common question that makes you think!

    Data Scientist VS Data Analyst - A very common question that makes you think!

    Data Scientist Innovating and figuring ways to fetch, build and create data sets. Technical background, knowledge of…

  • One does not simply do Data Science - Everyday graphs using R (Part 1)

    One does not simply do Data Science - Everyday graphs using R (Part 1)

    Working with data demands value generation. There is an urgent need to draw stories, color the numbers in patterns…

  • R for your data needs, try it now !

    R for your data needs, try it now !

    R can be your saving boat, the ship in the sea and the solid road towards data extraction and manipulation as and when…

    3 条评论

社区洞察

其他会员也浏览了