zeppelin/r/R/install-dev.sh
Amos Elb d5e87fb8ba R Interpreter for Zeppelin
This is the initial PR for an R Interpreter for Zeppelin.  There's still some work to be done (e.g., tests), but its useable, it brings to Zeppelin features from R like its library of statistics and machine learning packages, as well as advanced interactive visualizations.  So I'd like to open it up for others to comment and/or become involved.

 Summary:

- There are two interpreters, one emulates a REPL, the other uses knitr to weave markdown and formatted R output.  The two interpreters share a single execution environment.

- Visualisations:  Besides R's own graphics, this also supports interactive visualizations with googleVis and rCharts.  I am working on htmlwidgets (almost done) with the author of that package, and a next-step project is to get Shiny/ggvis working.  Sometimes, a visualization won't load until the page is reloaded.  I'm not sure why this is.

- Licensing:  To talk to R, this integrates code forked from rScala.  rScala was released with a BSD-license option, and the author's permission was obtained.

- Spark:  Getting R to share a single spark context with the Spark interpreter group is going to be a project.  For right now, the R interpreters live in their own "r" interpreter group, and new spark contexts are created on startup.

- Zeppelin Context:  Not yet integrated, in significant part because there's no ZeppelinContext to talk to until it lives in the Spark interpreter group.

- Documentation:  A notebook is included that demonstrates what the interpreter does and how to use it.

- Tests:  Working on it...

P.S.:  This is my first PR on a project of this size; let me know what I messed up and I'll try to fix it ASAP.

Author: Amos Elb <amos.elberg@me.com>
Author: Amos B. Elberg <amos.elberg@me.com>

Closes #208 from elbamos/rinterpreter and squashes the following commits:

ffc1a25 [Amos Elb] Fix rat issue
a08ec5b [Amos B. Elberg] R Interpreter
2016-04-05 16:35:18 +09:00

41 lines
No EOL
1.3 KiB
Bash
Executable file

#!/bin/bash
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# This scripts packages R files to create a package that can be loaded into R,
# and also installs necessary packages.
set -o pipefail
set -e
set -x
FWDIR="$(cd `dirname $0`; pwd)"
LIB_DIR="$FWDIR/../../R/lib"
mkdir -p $LIB_DIR
pushd $FWDIR > /dev/null
# Generate Rd files if devtools is installed
#Rscript -e ' if("devtools" %in% rownames(installed.packages())) { library(devtools); devtools::document(pkg="./pkg", roclets=c("rd")) }'
# Install SparkR to $LIB_DIR
R CMD INSTALL --library=$LIB_DIR $FWDIR/rzeppelin/
popd > /dev/null
set +x