GithubHelp home page GithubHelp logo

dstest's Introduction

DataSHIELD Project Client Environment

This R project template uses the renv for setting up a reproducible DataSHIELD client side R environment. This allows to use the appropriate DataSHIELD client R packages, matching the selected server-side DataSHIELD profiles.

The project's R environment includes the following R packages (and their dependencies):

Usage

Clone this Repository

Start by creating your project source code repository from this template: see instructions in Creating a repository from a template. You could also just download this folder, but it is a good practice to have source code in a version control system (Git).

Read the Introduction to renv vignette to learn the basics of R environment management.

Open Project in RStudio

  1. Open this project in Rstudio by selecting the project.Rproj file.
  2. If reported by renv in the R console, run the renv::restore() to install the R packages in their specific version (i.e. as described by the renv.lock file).

Use libPaths() to locate where the R packages are installed.

Adding a new Dependency

  1. Install the R package using install.packages() or using renv::install() which allows to manage R packages installed from an archived version, a GitHub repository, Bioconductor repository or a local package folder
  2. Load the R package in one of your R source code with library() (see R/script.R as an example)
  3. Run renv::snapshot() to save the new R environment in the file renv.lock file

Use Git Branches

Different R environments means different package dependencies, and also potentially different R/DataSHIELD analysis code. In order to maintain/develop different environments in parallel, you can use the Git branches. Upgrading to new versions of dependencies will be facilitated. To make a new branch:

  1. Select Git tab and New Branch in Rstudio, or command line git checkout -b branchName
  2. Install/update R packages
  3. Update analysis R script to connect to the appropriate DataSHIELD server profiles and to fix any breaking changes
  4. Run renv::snapshot()
  5. Commit changes in Git using Rstudio or command line

See also the vignette Collaborating with renv.

dstest's People

Contributors

tombisho avatar

Watchers

 avatar

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.