Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
I just created my first R package and started my first GitHub repo. The main function of the R package and some data files are still in development and I would like to track changes with colleagues on GitHub.
Should my repo consist of prepackaged files (pre-Rd) or packaged files? Every other R repo I've seen has packaged files but I assume they aren't still in the initial development phase.
If you want to build a package then you should start building it with the appropriate directories and supplemental files, but you just work on developing your source code until you've created a minimum viable product, at which one you can create an install-able package and update it as often as you like.
Truly, the sooner that you create the package the better because it paves the way to the best practice of iterative development and it also helps you to spot bugs as you make changes to your source code.
There's a good tutorial on building packages on GitHub at this blog I like called Hack-R.com (shameless self-promotion).
http://hack-r.com/write-an-r-package-from-scratch-with-github/
Related
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 1 year ago.
Improve this question
What are best practices to updating R and packages, when you have a stable programming environment, to avoid "breaking" code/package functionality?
Should you download a new update of R or package when it's out? Or is a "if it isn't broken don't fix it" mentality preferred.
Thanks.
For your programming environment, update unless you have good reason not to, and maintain a good test suite for your in-house code. For projects with special needs, use renv to control versions of packages.
For your production environment, use the renv package to keep package versions locked down, and upgrade in a controlled manner if there is an explicit need.
CRAN goes to great lengths to ensure that all current packages work with all other current packages under the current version of R.
So I tend to
update to new R versions as soon as theu becomes available
update CRAN packages (using a helper script) daily or near daily.
That has worked for more than two decades, including "in production". I have not needed renv but, as they say, different strokes for different folks. I also stay away from packages I suspect may break, and try not to install "random" github snapshots.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 4 years ago.
Improve this question
I am going to be in a team project. We do not have much time, so people will need to work at the same time on the project and quickly share their code. What would be the best way to do it?
I had two ideas: git and R Jupyter Notebook
I know there is mergetool in git - although I have never used it. Can somebody comment it?
What are the recommendations?
R Notebook is better in terms of sharing code but I do not imagine though 2 people writing code in Jupyter at the time.
With git people can work independently and simultaneously but can be problems with people committing changes at the same time.
Any recommendations are welcomed, I am quite new to this still.
Thanks.
I think that if you commit small and commit often, you shouldn't have that much of a trouble with git.
I feel that merge conflicts often happen due to misusage of git, that's just my two cents. :)
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
Is there any way to deploy machine Learning model written in R language as a webservice, I know we have Flask in python and many more too, but didnt come across for any such library for R Machine learning code.
As others suggested, you can use R-Shiny to build an app which you can later deploy as a web service easily. Moreover, you can use html code inside shiny so you can customise your layout to your heart's content. If you are using RStudio (which I definitely encourage if you don't), you only need to select File > New File > Shiny Web App... Have a look at documentation and examples here.
However, if you only want to create a compact and fast web service without having to build a layout etc, I would suggest you use R plumber library. This is a good solution if you don't need anything too fancy and also is easily implementable by adding decorators to your current code.
Hope this helps!
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I want to make my R Shiny App multilingual, but I don't know, where to start from. Is there any libraries or Shiny widgets for switching the language in the Shiny App?
More generally, what are the best practices for internationalization in R? Is there any tutorials? I know, there is a gettext command, which comes from GNU gettext, but I'm not very handy with it. Should I read GNU gettext manual first (and what chapters will be enough for beginner)?
I was looking to do the same thing and found this. The creator explains how it works and there is a github repository if you want to use his code in your app.
It works great for me as it's similar to the Zend Framework implementation which I had already used in the past.
The projects I have found attempting to solve this issue:
https://github.com/Appsilon/shiny.i18n (28 stars, last activity 4 days ago, preparing for CRAN package publication)
https://github.com/chrislad/multilingualShinyApp (8 stars, last activity 4 years ago)
It seems shiny.i18n is the best bet at the moment. I added an issue requesting support for gettext https://github.com/Appsilon/shiny.i18n/issues/15 as per Translation of R script using gettext
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
renjin's approach seems to be great. However compatibility to base R is not 100% and there are lots of very interesting packages out there which do not / only partly work with renjin.
I am fairly new to renjin but really would like to use it. But some important packages like the forecast package are missing - or at least the tests do not run in renjin.
To focus this question a little bit more I started to port the forecast package. You will find the current status https://github.com/geoHeil/forecast However it still contains errors.
Why does the build crash if I delete the man folder where the R documentation resides in?
I understand that other referenced packages may cause problems on import but even if they are disabled I still cannot load the namespace file to run my simple example hamcrest test-case
Why does it try to load the package from CRAN? Why is no default package specified?
This is the error message:
No default packages specified
Could not load this project's namespace (it may not have one)
org.renjin.eval.EvalException: Could not load package org.renjin.cran:forecast
Is there a better reference as http://docs.renjin.org/en/latest/writing-renjin-extensions.html to show how to move CRAN packages in a renjin compatible format?