Coding for an R package with interface

Hello everybody,

[Context]

I'm currently trying to improve my R programming skills, I'm a biologist with a very strong interest in the field of evolution, one of my goals would be to be able to formalize knowledge from this field into an R tool.

In addition, having established skills in R in the fields of data science and a little bit of Shiny application, I think it could be more than interesting for me to try my hand at programming R functions dedicated to a given problem and try to compile all this into a modest package.

[Technical project]

I'd like to make an R package that opens in the form of a local interface with the possibility of entering data, selecting things on the data in the form of interactive buttons, and displaying a corresponding graph like the Esquisse package can offer.

My background isn't in engineering, and I'm not very well trained in reverse engeenering, by the way.

[Technical question]

Do you know how, in a very basic way, it's possible to set up this type of interface by chance? And how to link it to R functions included in the package by chance?

Thank you in advance for your help and potential advice !

By "interface", you mean a graphical user interface (GUI)?

While there are several possibilities, nowadays the easiest is probably to just create a Shiny app. Looking briefly at the {esquisse} source code, that is what they are doing (and with some amount of wrapping to allow opening that app in the RStudio viewer pane, using an RStudio addin to start it with the mouse, ...)

So I would suggest you start by creating a simple Shiny app to interact with the rest of the package. If the package already has a lot of functions, it might be a good idea to split it into, on one side, the package that provides the computations (with lots of tests etc), on the other the Shiny app that just calls functions from this package. Once that's built, that would already be good enough for 99% of users. Then you can bother about either hosting it online, or making sure it's easy to use on a local RStudio install etc

1 Like

This topic was automatically closed after 45 days. New replies are no longer allowed.


If you have a query related to it or one of the replies, start a new topic and refer back with a link.