How to build an executable/installer from a routine written in R?

Asked

Viewed 876 times

5

I have several routines written in R, simple tools, which I would like to share with my colleagues. However, some of them do not have any knowledge in programming. So I want to facilitate the use of these tools.

For this I thought about creating an executable/installer for windows, containing these tools, but I have no idea how to do this or where to start.

Considering the routine Scalene Triangle shown below, which tests whether or not the triangle is scalene.

### Triangulo Escaleno
### Para um triangulo ser escaleno ele precisa ter os 3 lados diferentes

##Entrada de Dados
#Lados do Triangulo
a<-5
b<-3
c<-3

#Estrutura de Condição
if(a!=b & b!=c & c!=a){
   cat("É um triangulo escaleno")
}else{
   cat("Não é um triangulo escaleno")
}

How can I create or build an executable/installer for this routine?

  • 1

    See if it can help you here. http://www.r-bloggers.com/making-r-files-executable-under-windows/ Very self-explanatory documentation.

  • I’ll look. Thank you!

  • 1

    Okay, if you don’t make it tomorrow I can try to help you.

  • @Marconi, I read it really nice. I think this is the way, but I would like something that facilitates even more the use, something that also considers that the user does not have the R installed in the machine.

  • 2

    @Jean, this unfortunately does not exist. I currently believe that the best way is to create a web application using for example Shiny.

  • 1

    I agree with @Danielfalbel. Shiny is very easy to use, and you can publish for free on Shinyapps as long as the demand is small, or use a paid plan. You can also create a page to work as a hub for your apps and promote only one link.

  • 3

    Dear friends, as already mentioned, there is currently no way to do this. Someone can compile the answer explaining that it is not possible and listing some "alternatives" like Shiny a . bat etc.

Show 2 more comments

1 answer

5


Currently this is not possible. That is, it is not possible to create a standalone executable where one does not need to have R installed on their machine.

However, there are some alternatives, as mentioned in the comments. A solution in windows, for example, is to create a bat run the script from R. Another solution would be to make an interface Shiny that the person can run on the computer itself (but will need to have the R installed) or you put the application Shiny on a server and the person accesses only from the client side.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.