Compares the latest version of a file to the initial version checked into the repository. The output will appear in the viewer and only rows where there have been additions, deletions or modifications in the file will be shown.

diffOriginal(file, side_by_side = TRUE, ignore_white_space = FALSE)

Arguments

file

file path from working directory

side_by_side

Logical. Should diffs be displayed side by side?

ignore_white_space

Logical. Should white space be ignored?

Examples

with_demoRepo({
  diffOriginal("script/data-assembly.R")
})
#> Comparing local version of file 'script/data-assembly.R' to initial commit
#> < Previous version (a62f772)             > Current version (a894a79)            
#> @@ 1,5 @@                                @@ 1,13 @@                             
#>   library(tidyverse)                       library(tidyverse)                   
#> ~                                        > source(here::here("script", "data-ass
#> ~                                        : embly", "da-functions.R"))           
#>   src_abc <- mrgda::read_src_dir(here::    src_abc <- mrgda::read_src_dir(here::
#>   here("data", "source", "STUDY-ABC"))     here("data", "source", "STUDY-ABC")) 
#>   derived <- list(sl = list(),tv = list    derived <- list(sl = list(),tv = list
#>   ())                                      ())                                  
#>   dm_0 <- src_abc$dm %>% filter(ACTARM     dm_0 <- src_abc$dm %>% filter(ACTARM 
#>   != "Screen Failure")                     != "Screen Failure")                 
#>   derived$sl$dm <- dm_0                    derived$sl$dm <- dm_0                
#> ~                                        > pk_0 <- src_abc$pc %>% filter(PCTEST 
#> ~                                        : == "TEST OF INTEREST")               
#> ~                                        > derived$tv$pc <- pk_0                
#> ~                                        > ex_1 <- src_abc$ex %>% filter(EXTRT =
#> ~                                        : = "DRUG OF INTEREST")                
#> ~                                        > derived$tv$dosing <- ex_1            
#> ~                                        > lb_0 <- src_abc$lb                   
#> ~                                        > lb_1 <- lb_0 %>% filter(LBTEST == 'Te
#> ~                                        : st of interest')                     
#> ~                                        > vs_0 <- src_abc$vs