Giter Club home page Giter Club logo

r's Introduction

Specifying an R environment with a runtime.txt file

Jupyter+R: Binder

RStudio: Binder

RShiny: Binder

Binder supports using R and RStudio, with libraries pinned to a specific snapshot on packagemanager.rstudio.com.

Requirements and suggestions

You need to have a runtime.txt file that is formatted like:

r-<r-version>-<YYYY>-<MM>-<DD>

where <r-version> is a version of R (like 4.1, 4.0, etc) you want to use, and <YYYY>-<MM>-<DD> is the date for a snapshot from packagemanager.rstudio.com that will be used for installing your R packages.

Try using a date newer than 2022-01-01, as you'll get faster package installs thanks to binary packages from rstudio.packagemanager.com!

To install R libraries, add install.package("<package-name>") calls to install.R. If you want to pin to a specific version of the library, you can also do devtools::install_version("<package-name>", "<version>").

For some R packages, you might need to install system packages via apt - you can do so by writing out a list of apt package names in apt.txt. You can find the list of such packages in the page for your package at packagemanager.rstudio.com. Make sure to select "Ubuntu 18.04 (Bionic)" in the dropdown on the top right.

Both RStudio and IRKernel are installed by default, so you can use either the Jupyter notebook interface or the RStudio interface.

This repository also contains an example of a Shiny app.

Alternatives

There are many ways to use R in mybinder.org!

rocker/binder - this uses a base image from the R community's excellent rocker project - you get a lot of curated base packages, faster binary package installs as well as ability to pin to a specific version of R (>4.0).

r-conda - mybinder.org also supports using the conda package manager to manage R and R packages. This gives you access to specific R versions as well as fast installs of R packages available in conda-forge

Another alternative is to use the holepunch package for R.

URL addresses for RStudio and Shiny environments

The Binder repository can be used to allow anyone to access an RStudio environment containing our code and data right in their web browser. It also allows hosting a Shiny app. For those purposes, we have to append a bit of text to the URL of our Binder repository, which we can find out at mybinder.org when we enter the URL of our original repository from GitHub or Figshare, etc.

r's People

Contributors

betatim avatar cboettig avatar choldgraf avatar manics avatar pablobernabeu avatar raoofphysics avatar yuvipanda avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

r's Issues

How to run container with rstudio or shiny?

Hey binder team! Could you provide an example of how to run the container using rstudio or shiny? I see where the server is located, and in testing (I think) you would just run the server.R with Rscript or similar, but I'm not sure how it should be done properly from outside the container, with a docker command. To start us off, here is a quick reference for how to get the (notebook) running:

docker run --rm -it -p 8888:8888 vanessa/repo2docker-r jupyter notebook --ip 0.0.0.0

Thank you!

R installation

R is mainly used for data analysis task thanks to the huge number of packages and readily usable tests that often provide you with the necessary results.
When getting started with R, a good first step is to install the amazing RStudio IDE.
https://www.rstudio.com/products/rstudio/download/
https://www.r-project.org/

Getting Started with R for Data Analysis.

•Introduction to R :
R is a powerful tool for data analysis, offering a vast array of packages and tests for efficient and effective data exploration.

•Installing RStudio :
RStudio is an exceptional integrated development environment (IDE) for R.
It enhances your R coding experience and provides a user-friendly interface.
Download RStudio

•Setting Up R
Install R on your system.
Download R

shiny binder link is off

Not sure what exactly, but here's what I see:

image

The link has resolved to:

https://hub.mybinder.org/hub/bus-dashboard/?token=<MYTOKEN>

which seems wrong, since there is no pod URL in there...

Here's what the binder link in the readme points to:

https://mybinder.org/v2/gh/binder-examples/r/master?urlpath=shiny/bus-dashboard

If I do not include urlPath in the url, then it directs me to the correct URL. I can also confirm that urlPath still works fine on the jupyterlab demo repository.

cc @betatim !

LICENSE?

Can we add the standard Jupyter License here?

Unable to install tmap and tmap dependencies

Following the example, I expected that all I would have to do install tmap would be to use the following in my install.R file:

install.packages('tmap')

However, when I open the notebook, I receive the following error:

Error in library(tmap): there is no package called ‘tmap’
Traceback:

  1. library(tmap)
  2. stop(txt, domain = NA)

I have tried many variations but none have been successful.
https://github.com/RAJohansen/BindeR

Any ideas?

RStudio not working with repo2docker

[I'm not sure if this is the right place to file this issue, so please point me to the best repo in which to do so.]

I pulled the latest version of this repo to my machine and ran jupyter-repo2docker .. The container got built successfully and I received the token to launch the Jupyter notebooks. However, when I tried going to NewRStudio Session, I got the following error:

screen shot 2018-07-14 at 10 37 24

This was, I think, the relevant error on the console:

14 Jul 2018 08:36:23 [rsession-achintya] ERROR system error 13 (Permission denied) [message=User 'achintya' has id 501, which is lower than the minimum user id of 1000 (this is controlled by the the auth-minimum-user-id rserver option)];
OCCURRED AT: int main(int, char* const*) /home/ubuntu/rstudio/src/cpp/session/SessionMain.cpp:1631; LOGGED FROM: int main(int, char* const*) /home/ubuntu/rstudio/src/cpp/session/SessionMain.cpp:1639

What's the best way to resolve this without tinkering with one's system configuration?

MRAN - package ‘devtools’ is not available

Hello,

New compilation for R repositories based on MRAN are giving this error (including mybinder example https://mybinder.org/v2/gh/binder-examples/binder-r-description/master?urlpath=rstudio)

I'm using runtime.txt with the following string: r-3.6-2020-04-20, and I changed to r-3.6-2020-07-22 (last devtools snapshot on MRAN is 07-21) and the error persists.

> install.packages('devtools', repos='https://mran.microsoft.com/snapshot/2018-02-01', method='libcurl')
Installing package into ‘/srv/rlibs’
(as ‘lib’ is unspecified)
Warning: unable to access index for repository https://mran.microsoft.com/snapshot/2018-02-01/src/contrib:
  Line starting '<!doctype html><html ...' is malformed!
Warning message:
package ‘devtools’ is not available (for R version 3.6.3)

install.R does not appear to run when launching the RStudio instance

If you head to http://beta.mybinder.org/v2/gh/binder-examples/r/master?urlpath=rstudio from the README file and try to play with index.Rmd, you get an error when attempting to execute the first code chunk:

Error in library(ggplot2) : there is no package called ‘ggplot2’

It seems that the packages from install.R don't get installed when launching the RStudio instance.

If I first run install.R within RStudio (running source("install.R") in the Console, the error message doesn't appear and all works well.

Can this file be made to run when the RStudio instance is launched?

run R with Python 2.7

I there a way to run both R and Python 2.7 at jupyter-repo2docker,
since you can not put both of them into runtime.txt

Image fails to launch?

Not sure what I'm doing wrong, could be a chance error. Image seemed to have built (after some time) and pushed successfully, but fails to launch server:

https://mybinder.org/v2/gh/cboettig/geocompr/master?urlpath=rstudio

error message in the log isn't particularly informative:

Image gcr.io/binder-prod/r2d-05168b0-cboettig-2dgeocompr-38e476:d1bd8016f74bb9b56e982fe9eca7a08a5d9f2a5c for user cboettig-geocompr-r5xgth94 failed to launch

Any ideas?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.