Giter Site home page Giter Site logo

java-example-rbroker-data-io's Introduction

java-example-rbroker-data-io

The following tutorials demonstrate how different types of data inputs and outputs can be sent to and retrieved from DeployR-managed R sessions when executing tasks using the DeployR RBroker Framework.

About: DeployR Inputs

DeployR supports the following types of data inputs:

  1. DeployR-encoded application generated data, including data read from databases, data input by end-users, or data otherwise derived by your application logic. These data can be sent as inputs and automatically decoded into the workspace of an R session when executing R code or an R script.

  2. References to external data sources, including URLs, external Web service endpoints or database connection endpoints along with associated credentials and/or record identifiers. These data can be sent as DeployR-encoded inputs and automatically decoded into the workspace and then used to load data directly into an R session when executing R code or an R script.

  3. Uploaded data from files on the local file system (disk).

  4. References to repository-managed binary data files (rData) that cause the corresponding file data to be loaded into the workspace of an R session when executing R code or an R script.

  5. References to repository-managed data files (csv, dat, xls, etc) that cause the corresponding file data to be loaded into the working directory of an R session when executing R code or an R script.

About: DeployR Outputs

DeployR supports the following types of data outputs:

  1. DeployR-encoded R object workspace data (data.frame, list, primitive, etc) that were generated by the execution of R code or an R script.

  2. References to R session working directory binary files (rData, png, jpg, etc) that were generated by the execution of R code or an R script. These binary files can be downloaded from DeployR on request.

  3. References to R session working directory data files (csv, dat, xls, etc) that were generated by the execution of R code or an R script. These data files can be downloaded from DeployR on request.

  4. References to R session graphics device plots (png, jpg, svg, etc) that were generated by the execution of R code or an R script. These plots can be downloaded from DeployR on request.

  5. References to repository-managed data or binary files that were stored following the execution of R code or an R script. These repository-managed files can be downloaded from DeployR on request.

Tutorial: Authenticated Users & Data I/O

Authenticated (trusted) users can execute both R code and repository-managed R scripts that they themselves have created or R scripts that have been shared by other authenticated (trusted) users.

Authenticated users can use the full set of data inputs and outputs described above.

The following tutorials demonstrate the data I/O options available to authenticated users:

Tutorial: Anonymous Users & Data I/O

Anonymous (untrusted) users can only execute repository-managed R scripts that have been assigned public access privileges by authenticated (trusted) users.

Anonymous users can use the full set of data inputs and outputs described above with a single exception: anonymous users can not cause data or binary files to be stored into the DeployR-repository and as such can not retrieve references to repository-managed data or binary files following an execution.

The following tutorial demonstrate the data I/O options available to anonymous users:

Tutorial: All Users Big Data I/O

The set of data I/O tutorials detailed above for authenticated and anonymous users cover most use cases for moving data into and out of the DeployR server. However, there are times when you may want to work with data that is simply too large to move between your client application and the DeployR server. This is particularly true when you are working with genuinely Big Data files.

For this, DeployR provides support for a feature called the External (Big Data) Directories. See here for details.

R Analytics Example Dependencies

Source: analytics/*

Most of the examples use a sample data file based on the Hipparcos Star Dataset, found here.

This data file is found here:

analytics/hipStar.dat

Some of the examples use a sample binary file containing an R data.frame based on the Hipparcos Star Dataset, found here.

This binary file is found here:

analytics/hipStar.rData

All of the examples use a sample R script that demonstrates the handling of inputs and the generation of outputs each time the script is executed.

This R script is found here:

analytics/dataIO.R

The R scripts and data files used by these example application are not bundled by default within the DeployR 7.4 repository.

The simplest way to deploy these files for use when running these example applications is to use the DeployR CLI. The CLI will automatically deploy the file dependencies to the DeployR repository before running the examples.

If for any reason you want to manually deploy these files for testing purposes you can use the DeployR Repository Manager as follows:

  1. Log in as testuser into the Repository Manager
  2. Create a new repository directory called example-data-io
  3. Upload analytics/hipStar.dat to the example-data-io directory and set the access control to public.
  4. Upload analytics/hipStar.rData to the example-data-io directory directory and set the access control to public.
  5. Upload analytics/dataIO.R to the example-data-io directory directory and set the access control to 1public`.

License

Copyright (C) 2010-2016, Microsoft Corporation

This program is licensed to you under the terms of Version 2.0 of the Apache License. This program is distributed WITHOUT ANY EXPRESS OR IMPLIED WARRANTY, INCLUDING THOSE OF NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Please refer to the Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0) for more details.

java-example-rbroker-data-io's People

Contributors

david-russell avatar microsoft-github-policy-service[bot] avatar swells avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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.