Develop Portable R Code for Use with DeployR
Перейти к файлу
microsoft-github-policy-service[bot] bf2c5383b7
Auto merge mandatory file pr
This pr is auto merged as it contains a mandatory file and is opened for more than 10 days.
2023-06-14 15:19:32 +00:00
R chore (maintenance): version bump, doc changes, fixed local scope issues 2016-06-16 14:27:29 -07:00
man chore (maintenance): Add FWLinks for rebranding 2015-11-30 09:12:44 -08:00
tests test(deployrInput) Added new test spec for exsisting objects 2015-09-06 11:23:18 -07:00
.Rbuildignore first commit 2015-07-21 12:24:57 -07:00
.gitignore first commit 2015-07-21 12:24:57 -07:00
DESCRIPTION chore (maintenance): version bump, doc changes, fixed local scope issues 2016-06-16 14:27:29 -07:00
LICENSE updated the copyrights, github links... more up to date than Master 2016-05-03 12:11:38 -05:00
LICENSE.md updated the copyrights, github links... more up to date than Master 2016-05-03 12:11:38 -05:00
NAMESPACE chore (maintenance): Add FWLinks for rebranding 2015-11-30 09:12:44 -08:00
README.md updated the copyrights, github links... more up to date than Master 2016-05-03 12:11:38 -05:00
SECURITY.md Microsoft mandatory file 2023-06-02 21:29:03 +00:00

README.md

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