GithubHelp home page GithubHelp logo

alexxnica / deployrutils Goto Github PK

View Code? Open in Web Editor NEW

This project forked from microsoft/deployrutils

0.0 1.0 0.0 44 KB

Develop Portable R Code for Use with DeployR

License: MIT License

R 100.00%

deployrutils's Introduction

deployrUtils - Develop Portable R Code for Use with DeployR

Build Status

Package Overview

The goal of deployrUtils is to solve several R portability issues that arise when developing R analytics for use in your local R environment and in the DeployR server environment. They are package portability, input portability, and portable access to data files.

These portability issues can be solved when you use the following functions in the deployrUtils package.

  • Use the deployrPackage function to declare your package dependencies in your R code.
  • Use the deployrInput function to declare the required inputs along with default values in your R code.
  • Use the deployrExternal function to access big data files from your R code.

Package Installation

Get the latest stable development version from github:

# Use `devtools` to install directly from github
library(devtools)
install_github("Microsoft/deployrUtils")

See devtools for more options.

Usage

Install and load R packages to ensure package portability:

# Use `deployrPackage()` to ensure package dependencies are installed & loaded 
# at the start of your script.
> deployrPackage("ggplot2")
Loading required package: ggplot2
...
...
...
Loading required package: ggplot2
> ?ggplot2

Declare inputs to ensure R script input portability:

# Creates a `character` variable named `char` if it does not exist
> deployrInput('{ "name": "balance", "render": "integer", "default": "500" } ')
> balance
[1] 500

Access big data files in a portable way across environments:

## Referencing a CSV data file in your external directory
data <- read.csv(file = deployrExternal("data.csv")) 

## Referencing an XDF data file in your external directory
df <- RxXdfData(deployrExternal("data.xdf"))

More Information

Issues:

Post an issue

Website:

Learn more

Made by:

Microsoft Corporation

deployrutils's People

Contributors

j-martens avatar swells 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.