Capture changes made to the code base

Hi all,

Is there a way to identify the changes made in the codebase. For example. below is the 1st set of application. Later on I make some changes to the codebase (Refer 2nd set). Is there a way to identify that changes are made and display what are the changes. I think we can do this by recordtest but is there other way to solve this

1st Set
ui.R

library(shiny)


# Define UI for application that draws a histogram
shinyUI(fluidPage(
  
  textInput("name", "Name: "),
  textOutput("greeting"),
  selectInput("Slider","Slider",choices = unique(iris$Species))
  )
  )

server.R

library(shiny)

shinyServer(function(input, output) {
  
  output$greeting <- renderText({
    paste0("Hello, ", input$name, "!")
  })
    
  })

2nd Set
ui.R

library(shiny)


# Define UI for application that draws a histogram
shinyUI(fluidPage(
  
  textInput("name", "Name: "),
  textOutput("greetings"),  #Small change
  selectInput("Slider","Slider",choices = unique(iris$Species))
  )
  )

server.R

library(shiny)

shinyServer(function(input, output) {
  
  output$greetings <- renderText({   #Small change
    paste0("Hello, ", input$name, "!")
  })
    
  })

Expected output (Similar kind of output)
Changes are **made in Lines X.**

Changes are **greeting to greetings?**

Unix tools such as diff exist.
Also version (or source) control software is available.
In particular git works well with excellent RStudio IDE integration. I'd you are working on any serious project, I would say using version/source control is incredibly important.

Hi,

Thanks. Will check. But is there any way to check locally. I mean by writing Rscripts ?

You could use something like the diffr package but it would be a wacky workflow, when developing apps, version control like git is the way to go and it is integrated with RStudio so you don't even have to leave the IDE.

Thanks a lot. Noted......

For any future readers of this thread , a guide

Hi Nir.

Thanks a lot. Really helpful.

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.