User Tools

Site Tools


blog:install_an_external_program_within_r

Install an external program within R

This is an example to download and install an external program / software within R.

dotRcheck <- function(){
  #Check for audiolyzR installation
  directory<-getwd()
  if (.Platform$OS.type=="windows"){
      ANSWER <- readline("Do you want to install Graphviz for path diagram generation? \nType y or n\n")
      if (substr(ANSWER,1,1)=="y"){
        tmpdir <- getwd()
        destfile<-paste(tmpdir, "graphviz-2.30.1.msi", sep="/")
        download.file("http://www.graphviz.org/pub/graphviz/stable/windows/graphviz-2.30.1.msi", destfile=destfile)
        shell(paste("msiexec /a ",destfile))              
      }
  }
}     
You could leave a comment if you were logged in.
blog/install_an_external_program_within_r.txt · Last modified: 2016/01/24 09:48 by 127.0.0.1