R How to compare Rows and Delete by Matching Strings -


  match       date   points  opponent points reb opponent reb dal vs den  8/16/2015       20               21  10           15 den vs dal  8/16/2015       21               20  15           10 

i have dataframe sports data. however, have 2 rows every game due way data had collected. example 2 rows above same game, again data had collected twice each game in case: once dal , 1 den.

i'd find way delete duplicate games. figure 1 of conditions compare have game date. how else able tell r check delete duplicate rows? assume should able tell r to:

  1. check game date matches
  2. if game date match , if "teams" match delete duplicate. (can done though strings not exact match, i.e. since den vs dal , dal vs den not matching string?)
  3. move on next row , repeat until end of spreadsheet.
  4. r not need check more 50 rows down before moving on next row.
  5. is there function test matching individual words? example not want have tell r: "if cell contains den... or "if cell contains dal involve many teams. r needs able check cells value in , find out if same value can found string in later rows.

please help.


Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)

Google AdWords and AdSense - A Dynamic Small Business Marketing Duo