0

A basketball season's fixture was displayed as a table on a webpage. I copied and saved as a .csv file before reading into R. Cleaning was straightforward until I couldn't find a way to replace NAs with Round numbers. See below:

    ROUND DATE       TIME   VENUE                           
   <int> <date>     <time> <chr>                               
 1     1 2018-03-16 20:40  Casey Stadium Crt 2                    
 2    NA 2018-03-16 20:40  Frankston Crt 2                        
 3    NA 2018-03-16 20:40  State Basketball Centre Court 4        
 4    NA 2018-03-16 20:40  Waverley Crt 2                         
 5    NA 2018-03-16 21:40  Sandringham Crt 4                      
 6     2 2018-03-23 19:40  Sandringham Crt 2                      
 7    NA 2018-03-23 20:40  Chelsea Crt 2                          
 8    NA 2018-03-23 20:40  Knox Crt 3                             
 9    NA 2018-03-23 20:40  Waverley Crt 2                         
10    NA 2018-03-23 21:30  Balwyn High Crt 1                      
11     3 2018-04-20 20:30  Balwyn High Crt 2                      
12    NA 2018-04-20 20:30  Brighton Crt 1                         
13    NA 2018-04-20 20:40  Chelsea Crt 
14    NA 2018-04-20 20:40  Kilsyth Crt 5                          
15    NA 2018-04-20 20:40  Knox Crt 4                             

Rows 1-5 should all be ROUND = 1, Rows 6-10 should all be ROUND = 2 etc. I guess I have to "group_by" DATE but then what? Thanks for your help

Dan
  • 11,370
  • 4
  • 43
  • 68

0 Answers0