Skip to content

Commit adb66a3

Browse files
Merge branch 'upstream/master'
Conflicts: zeppelin-web/src/app/notebook/paragraph/paragraph.css
2 parents 6363e97 + 7d6cc7e commit adb66a3

File tree

109 files changed

+7619
-303
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+7619
-303
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
spark/derby.log
1313
spark/metastore_db
1414
spark-1.*-bin-hadoop*
15+
.spark-dist
1516
zeppelin-server/derby.log
1617

1718
lens/lens-cli-hist.log

.travis.yml

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,34 @@
1515

1616
language: java
1717

18+
sudo: false
19+
20+
cache:
21+
directories:
22+
- .spark-dist
23+
24+
addons:
25+
apt:
26+
sources:
27+
- r-packages-precise
28+
packages:
29+
- r-base-dev
30+
- r-cran-evaluate
31+
- r-cran-base64enc
32+
1833
matrix:
1934
include:
2035
# Test all modules
2136
- jdk: "oraclejdk7"
22-
env: SPARK_VER="1.6.0" HADOOP_VER="2.3" PROFILE="-Pspark-1.6 -Phadoop-2.3 -Ppyspark -Pscalding" BUILD_FLAG="package -Pbuild-distr" TEST_FLAG="verify -Pusing-packaged-distr" TEST_PROJECTS=""
37+
env: SPARK_VER="1.6.1" HADOOP_VER="2.3" PROFILE="-Pspark-1.6 -Pr -Phadoop-2.3 -Ppyspark -Psparkr -Pscalding" BUILD_FLAG="package -Pbuild-distr" TEST_FLAG="verify -Pusing-packaged-distr" TEST_PROJECTS=""
2338

2439
# Test spark module for 1.5.2
2540
- jdk: "oraclejdk7"
26-
env: SPARK_VER="1.5.2" HADOOP_VER="2.3" PROFILE="-Pspark-1.5 -Phadoop-2.3 -Ppyspark" BUILD_FLAG="package -DskipTests" TEST_FLAG="verify" TEST_PROJECTS="-pl zeppelin-interpreter,zeppelin-zengine,zeppelin-server,zeppelin-display,spark-dependencies,spark -Dtest=org.apache.zeppelin.rest.*Test,org.apache.zeppelin.spark* -DfailIfNoTests=false"
41+
env: SPARK_VER="1.5.2" HADOOP_VER="2.3" PROFILE="-Pspark-1.5 -Pr -Phadoop-2.3 -Ppyspark -Psparkr" BUILD_FLAG="package -DskipTests" TEST_FLAG="verify" TEST_PROJECTS="-pl zeppelin-interpreter,zeppelin-zengine,zeppelin-server,zeppelin-display,spark-dependencies,spark,r -Dtest=org.apache.zeppelin.rest.*Test,org.apache.zeppelin.spark* -DfailIfNoTests=false"
2742

2843
# Test spark module for 1.4.1
2944
- jdk: "oraclejdk7"
30-
env: SPARK_VER="1.4.1" HADOOP_VER="2.3" PROFILE="-Pspark-1.4 -Phadoop-2.3 -Ppyspark" BUILD_FLAG="package -DskipTests" TEST_FLAG="verify" TEST_PROJECTS="-pl zeppelin-interpreter,zeppelin-zengine,zeppelin-server,zeppelin-display,spark-dependencies,spark -Dtest=org.apache.zeppelin.rest.*Test,org.apache.zeppelin.spark* -DfailIfNoTests=false"
45+
env: SPARK_VER="1.4.1" HADOOP_VER="2.3" PROFILE="-Pspark-1.4 -Pr -Phadoop-2.3 -Ppyspark -Psparkr" BUILD_FLAG="package -DskipTests" TEST_FLAG="verify" TEST_PROJECTS="-pl zeppelin-interpreter,zeppelin-zengine,zeppelin-server,zeppelin-display,spark-dependencies,spark,r -Dtest=org.apache.zeppelin.rest.*Test,org.apache.zeppelin.spark* -DfailIfNoTests=false"
3146

3247
# Test spark module for 1.3.1
3348
- jdk: "oraclejdk7"
@@ -41,11 +56,16 @@ matrix:
4156
- jdk: "oraclejdk7"
4257
env: SPARK_VER="1.1.1" HADOOP_VER="2.3" PROFILE="-Pspark-1.1 -Phadoop-2.3 -Ppyspark" BUILD_FLAG="package -DskipTests" TEST_FLAG="verify" TEST_PROJECTS="-pl zeppelin-interpreter,zeppelin-zengine,zeppelin-server,zeppelin-display,spark-dependencies,spark -Dtest=org.apache.zeppelin.rest.*Test,org.apache.zeppelin.spark* -DfailIfNoTests=false"
4358

44-
# Test selenium with spark module for 1.6.0
59+
# Test selenium with spark module for 1.6.1
4560
- jdk: "oraclejdk7"
46-
env: TEST_SELENIUM="true" SPARK_VER="1.6.0" HADOOP_VER="2.3" PROFILE="-Pspark-1.6 -Phadoop-2.3 -Ppyspark" BUILD_FLAG="package -DskipTests" TEST_FLAG="verify" TEST_PROJECTS="-pl zeppelin-interpreter,zeppelin-zengine,zeppelin-server,zeppelin-display,spark-dependencies,spark -Dtest=org.apache.zeppelin.AbstractFunctionalSuite -DfailIfNoTests=false"
61+
env: TEST_SELENIUM="true" SPARK_VER="1.6.1" HADOOP_VER="2.3" PROFILE="-Pspark-1.6 -Phadoop-2.3 -Ppyspark" BUILD_FLAG="package -DskipTests" TEST_FLAG="verify" TEST_PROJECTS="-pl zeppelin-interpreter,zeppelin-zengine,zeppelin-server,zeppelin-display,spark-dependencies,spark -Dtest=org.apache.zeppelin.AbstractFunctionalSuite -DfailIfNoTests=false"
4762

4863
before_install:
64+
- "ls -la .spark-dist"
65+
- mkdir -p ~/R
66+
- echo 'R_LIBS=~/R' > ~/.Renviron
67+
- R -e "install.packages('knitr', repos = 'http://cran.us.r-project.org', lib='~/R')"
68+
- export R_LIBS='~/R'
4969
- "export DISPLAY=:99.0"
5070
- "sh -e /etc/init.d/xvfb start"
5171

@@ -56,6 +76,7 @@ before_script:
5676
- travis_retry ./testing/downloadSpark.sh $SPARK_VER $HADOOP_VER
5777
- ./testing/startSparkCluster.sh $SPARK_VER $HADOOP_VER
5878
- echo "export SPARK_HOME=`pwd`/spark-$SPARK_VER-bin-hadoop$HADOOP_VER" > conf/zeppelin-env.sh
79+
- tail conf/zeppelin-env.sh
5980

6081
script:
6182
- mvn $TEST_FLAG $PROFILE -B $TEST_PROJECTS
@@ -69,6 +90,3 @@ after_failure:
6990
after_script:
7091
- ./testing/stopSparkCluster.sh $SPARK_VER $HADOOP_VER
7192

72-
notifications:
73-
slack:
74-
secure: dtIkPwlf5uTun19p9TtPEAFmrLOMK2COE8TL9m8LXX/N2WzJaKYvAnovMObEV6KEgK2oZ+72Cke7eBI+Hp4FmHZ2B7mQI/PNCfRZthI3cc3zVmMd25yvLH9AlCRa2bC6R885z2copvzaoZtLBkHnPa8bUrUkbmRp40qkDPQpgO4=

LICENSE

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,4 +244,16 @@ Apache licenses
244244
The following components are provided under the Apache License. See project link for details.
245245
The text of each license is also included at licenses/LICENSE-[project]-[version].txt.
246246

247-
(Apache 2.0) Bootstrap v3.0.2 (http://getbootstrap.com/) - https://github.com/twbs/bootstrap/blob/v3.0.2/LICENSE
247+
(Apache 2.0) Bootstrap v3.0.2 (http://getbootstrap.com/) - https://github.com/twbs/bootstrap/blob/v3.0.2/LICENSE
248+
249+
========================================================================
250+
BSD 3-Clause licenses
251+
========================================================================
252+
The following components are provided under the BSD 3-Clause license. See file headers and project links for details.
253+
254+
(BSD 3 Clause) portions of rscala 1.0.6 (https://dahl.byu.edu/software/rscala/) - https://cran.r-project.org/web/packages/rscala/index.html
255+
r/R/rzeppelin/R/{common.R, globals.R,protocol.R,rServer.R,scalaInterpreter.R,zzz.R }
256+
r/src/main/scala/org/apache/zeppelin/rinterpreter/rscala/{Package.scala, RClient.scala}
257+
258+
(BSD 3 Clause) portions of Scala (http://www.scala-lang.org/download) - http://www.scala-lang.org/download/#License
259+
r/src/main/scala/scala/Console.scala

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ Available profiles are
129129
-Pmapr40
130130
-Pmapr41
131131
-Pmapr50
132+
-Pmapr51
132133
```
133134

134135

bin/interpreter.sh

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,10 @@ if [[ "${INTERPRETER_ID}" == "spark" ]]; then
8585
export SPARK_SUBMIT="${SPARK_HOME}/bin/spark-submit"
8686
SPARK_APP_JAR="$(ls ${ZEPPELIN_HOME}/interpreter/spark/zeppelin-spark*.jar)"
8787
# This will evantually passes SPARK_APP_JAR to classpath of SparkIMain
88-
ZEPPELIN_CLASSPATH+=${SPARK_APP_JAR}
88+
ZEPPELIN_CLASSPATH=${SPARK_APP_JAR}
89+
# Need to add the R Interpreter
90+
RZEPPELINPATH="$(ls ${ZEPPELIN_HOME}/interpreter/spark/zeppelin-zr*.jar)"
91+
ZEPPELIN_CLASSPATH="${ZEPPELIN_CLASSPATH}:${RZEPPELINPATH}"
8992

9093
pattern="$SPARK_HOME/python/lib/py4j-*-src.zip"
9194
py4j=($pattern)
@@ -130,8 +133,18 @@ if [[ "${INTERPRETER_ID}" == "spark" ]]; then
130133
ZEPPELIN_CLASSPATH+=":${HADOOP_CONF_DIR}"
131134
fi
132135

136+
RZEPPELINPATH="$(ls ${ZEPPELIN_HOME}/interpreter/spark/zeppelin-zr*.jar)"
137+
ZEPPELIN_CLASSPATH="${ZEPPELIN_CLASSPATH}:${RZEPPELINPATH}"
133138
export SPARK_CLASSPATH+=":${ZEPPELIN_CLASSPATH}"
134139
fi
140+
elif [[ "${INTERPRETER_ID}" == "hbase" ]]; then
141+
if [[ -n "${HBASE_CONF_DIR}" ]]; then
142+
ZEPPELIN_CLASSPATH+=":${HBASE_CONF_DIR}"
143+
elif [[ -n "${HBASE_HOME}" ]]; then
144+
ZEPPELIN_CLASSPATH+=":${HBASE_HOME}/conf"
145+
else
146+
echo "HBASE_HOME and HBASE_CONF_DIR are not set, configuration might not be loaded"
147+
fi
135148
fi
136149

137150
addJarInDir "${LOCAL_INTERPRETER_REPO}"

conf/shiro.ini

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,12 @@ user3 = password4, role2
2929
#ldapRealm.userDnTemplate = cn={0},cn=engg,ou=testdomain,dc=testdomain,dc=com
3030
#ldapRealm.contextFactory.url = ldap://ldaphost:389
3131
#ldapRealm.contextFactory.authenticationMechanism = SIMPLE
32+
shiro.loginUrl = /api/login
3233

3334
[urls]
3435
# anon means the access is anonymous.
3536
# authcBasic means Basic Auth Security
3637
# To enfore security, comment the line below and uncomment the next one
38+
/api/version = anon
3739
/** = anon
38-
#/** = authcBasic
39-
40+
#/** = authc

conf/zeppelin-env.sh.template

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,9 @@
6464
# export ZEPPELIN_SPARK_MAXRESULT # Max number of SparkSQL result to display. 1000 by default.
6565
# export ZEPPELIN_WEBSOCKET_MAX_TEXT_MESSAGE_SIZE # Size in characters of the maximum text message to be received by websocket. Defaults to 1024000
6666

67+
#### HBase interpreter configuration ####
68+
69+
## To connect to HBase running on a cluster, either HBASE_HOME or HBASE_CONF_DIR must be set
70+
71+
# export HBASE_HOME= # (require) Under which HBase scripts and configuration should be
72+
# export HBASE_CONF_DIR= # (optional) Alternatively, configuration directory can be set to point to the directory that has hbase-site.xml

conf/zeppelin-site.xml.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@
144144

145145
<property>
146146
<name>zeppelin.interpreters</name>
147-
<value>org.apache.zeppelin.spark.SparkInterpreter,org.apache.zeppelin.spark.PySparkInterpreter,org.apache.zeppelin.spark.SparkSqlInterpreter,org.apache.zeppelin.spark.DepInterpreter,org.apache.zeppelin.markdown.Markdown,org.apache.zeppelin.angular.AngularInterpreter,org.apache.zeppelin.shell.ShellInterpreter,org.apache.zeppelin.hive.HiveInterpreter,org.apache.zeppelin.tajo.TajoInterpreter,org.apache.zeppelin.file.HDFSFileInterpreter,org.apache.zeppelin.flink.FlinkInterpreter,org.apache.zeppelin.lens.LensInterpreter,org.apache.zeppelin.ignite.IgniteInterpreter,org.apache.zeppelin.ignite.IgniteSqlInterpreter,org.apache.zeppelin.cassandra.CassandraInterpreter,org.apache.zeppelin.geode.GeodeOqlInterpreter,org.apache.zeppelin.postgresql.PostgreSqlInterpreter,org.apache.zeppelin.jdbc.JDBCInterpreter,org.apache.zeppelin.phoenix.PhoenixInterpreter,org.apache.zeppelin.kylin.KylinInterpreter,org.apache.zeppelin.elasticsearch.ElasticsearchInterpreter,org.apache.zeppelin.scalding.ScaldingInterpreter,org.apache.zeppelin.alluxio.AlluxioInterpreter,org.apache.zeppelin.hbase.HbaseInterpreter</value>
147+
<value>org.apache.zeppelin.spark.SparkInterpreter,org.apache.zeppelin.spark.PySparkInterpreter,org.apache.zeppelin.spark.SparkRInterpreter,org.apache.zeppelin.spark.SparkSqlInterpreter,org.apache.zeppelin.spark.DepInterpreter,org.apache.zeppelin.markdown.Markdown,org.apache.zeppelin.angular.AngularInterpreter,org.apache.zeppelin.shell.ShellInterpreter,org.apache.zeppelin.hive.HiveInterpreter,org.apache.zeppelin.tajo.TajoInterpreter,org.apache.zeppelin.file.HDFSFileInterpreter,org.apache.zeppelin.flink.FlinkInterpreter,org.apache.zeppelin.lens.LensInterpreter,org.apache.zeppelin.ignite.IgniteInterpreter,org.apache.zeppelin.ignite.IgniteSqlInterpreter,org.apache.zeppelin.cassandra.CassandraInterpreter,org.apache.zeppelin.geode.GeodeOqlInterpreter,org.apache.zeppelin.postgresql.PostgreSqlInterpreter,org.apache.zeppelin.jdbc.JDBCInterpreter,org.apache.zeppelin.phoenix.PhoenixInterpreter,org.apache.zeppelin.kylin.KylinInterpreter,org.apache.zeppelin.elasticsearch.ElasticsearchInterpreter,org.apache.zeppelin.scalding.ScaldingInterpreter,org.apache.zeppelin.alluxio.AlluxioInterpreter,org.apache.zeppelin.hbase.HbaseInterpreter,org.apache.zeppelin.rinterpreter.KnitR,org.apache.zeppelin.rinterpreter.RRepl</value>
148148
<description>Comma separated interpreter configurations. First interpreter become a default</description>
149149
</property>
150150

docs/_includes/themes/zeppelin/_navigation.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
<li><a href="{{BASE_PATH}}/interpreter/lens.html">Lens</a></li>
5555
<li><a href="{{BASE_PATH}}/interpreter/markdown.html">Markdown</a></li>
5656
<li><a href="{{BASE_PATH}}/interpreter/postgresql.html">Postgresql, hawq</a></li>
57+
<li><a href="{{BASE_PATH}}/interpreter/R.html">R</a></li>
5758
<li><a href="{{BASE_PATH}}/interpreter/scalding.html">Scalding</a></li>
5859
<li><a href="{{BASE_PATH}}/pleasecontribute.html">Shell</a></li>
5960
<li><a href="{{BASE_PATH}}/interpreter/spark.html">Spark</a></li>

docs/interpreter/R.md

Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
---
2+
layout: page
3+
title: "R Interpreter"
4+
description: ""
5+
group: manual
6+
---
7+
{% include JB/setup %}
8+
9+
## R Interpreter
10+
11+
This is a the Apache (incubating) Zeppelin project, with the addition of support for the R programming language and R-spark integration.
12+
13+
### Requirements
14+
15+
Additional requirements for the R interpreter are:
16+
17+
* R 3.1 or later (earlier versions may work, but have not been tested)
18+
* The `evaluate` R package.
19+
20+
For full R support, you will also need the following R packages:
21+
22+
* `knitr`
23+
* `repr` -- available with `devtools::install_github("IRkernel/repr")`
24+
* `htmltools` -- required for some interactive plotting
25+
* `base64enc` -- required to view R base plots
26+
27+
### Configuration
28+
29+
To run Zeppelin with the R Interpreter, the SPARK_HOME environment variable must be set. The best way to do this is by editing `conf/zeppelin-env.sh`.
30+
31+
If it is not set, the R Interpreter will not be able to interface with Spark.
32+
33+
You should also copy `conf/zeppelin-site.xml.template` to `conf/zeppelin-site.xml`. That will ensure that Zeppelin sees the R Interpreter the first time it starts up.
34+
35+
### Using the R Interpreter
36+
37+
By default, the R Interpreter appears as two Zeppelin Interpreters, `%r` and `%knitr`.
38+
39+
`%r` will behave like an ordinary REPL. You can execute commands as in the CLI.
40+
41+
[![2+2](screenshots/repl2plus2.png)](screenshots/repl2plus2.png)
42+
43+
R base plotting is fully supported
44+
45+
[![replhist](screenshots/replhist.png)](screenshots/replhist.png)
46+
47+
If you return a data.frame, Zeppelin will attempt to display it using Zeppelin's built-in visualizations.
48+
49+
[![replhist](screenshots/replhead.png)](screenshots/replhead.png)
50+
51+
`%knitr` interfaces directly against `knitr`, with chunk options on the first line:
52+
53+
[![knitgeo](screenshots/knitgeo.png)](screenshots/knitgeo.png)
54+
[![knitstock](screenshots/knitstock.png)](screenshots/knitstock.png)
55+
[![knitmotion](screenshots/knitmotion.png)](screenshots/knitmotion.png)
56+
57+
The two interpreters share the same environment. If you define a variable from `%r`, it will be within-scope if you then make a call using `knitr`.
58+
59+
### Using SparkR & Moving Between Languages
60+
61+
If `SPARK_HOME` is set, the `SparkR` package will be loaded automatically:
62+
63+
[![sparkrfaithful](screenshots/sparkrfaithful.png)](screenshots/sparkrfaithful.png)
64+
65+
The Spark Context and SQL Context are created and injected into the local environment automatically as `sc` and `sql`.
66+
67+
The same context are shared with the `%spark`, `%sql` and `%pyspark` interpreters:
68+
69+
[![backtoscala](screenshots/backtoscala.png)](screenshots/backtoscala.png)
70+
71+
You can also make an ordinary R variable accessible in scala and Python:
72+
73+
[![varr1](screenshots/varr1.png)](screenshots/varr1.png)
74+
75+
And vice versa:
76+
77+
[![varscala](screenshots/varscala.png)](screenshots/varscala.png)
78+
[![varr2](screenshots/varr2.png)](screenshots/varr2.png)
79+
80+
### Caveats & Troubleshooting
81+
82+
* Almost all issues with the R interpreter turned out to be caused by an incorrectly set `SPARK_HOME`. The R interpreter must load a version of the `SparkR` package that matches the running version of Spark, and it does this by searching `SPARK_HOME`. If Zeppelin isn't configured to interface with Spark in `SPARK_HOME`, the R interpreter will not be able to connect to Spark.
83+
84+
* The `knitr` environment is persistent. If you run a chunk from Zeppelin that changes a variable, then run the same chunk again, the variable has already been changed. Use immutable variables.
85+
86+
* (Note that `%spark.r` and `$r` are two different ways of calling the same interpreter, as are `%spark.knitr` and `%knitr`. By default, Zeppelin puts the R interpreters in the `%spark.` Interpreter Group.
87+
88+
* Using the `%r` interpreter, if you return a data.frame, HTML, or an image, it will dominate the result. So if you execute three commands, and one is `hist()`, all you will see is the histogram, not the results of the other commands. This is a Zeppelin limitation.
89+
90+
* If you return a data.frame (for instance, from calling `head()`) from the `%spark.r` interpreter, it will be parsed by Zeppelin's built-in data visualization system.
91+
92+
* Why `knitr` Instead of `rmarkdown`? Why no `htmlwidgets`? In order to support `htmlwidgets`, which has indirect dependencies, `rmarkdown` uses `pandoc`, which requires writing to and reading from disc. This makes it many times slower than `knitr`, which can operate entirely in RAM.
93+
94+
* Why no `ggvis` or `shiny`? Supporting `shiny` would require integrating a reverse-proxy into Zeppelin, which is a task.
95+
96+
* Max OS X & case-insensitive filesystem. If you try to install on a case-insensitive filesystem, which is the Mac OS X default, maven can unintentionally delete the install directory because `r` and `R` become the same subdirectory.
97+
98+
* Error `unable to start device X11` with the repl interpreter. Check your shell login scripts to see if they are adjusting the `DISPLAY` environment variable. This is common on some operating systems as a workaround for ssh issues, but can interfere with R plotting.
99+
100+
* akka Library Version or `TTransport` errors. This can happen if you try to run Zeppelin with a SPARK_HOME that has a version of Spark other than the one specified with `-Pspark-1.x` when Zeppelin was compiled.
101+
102+
103+
104+
105+
106+
## R Interpreter for Apache Zeppelin
107+
108+
[R](https://www.r-project.org) is a free software environment for statistical computing and graphics.
109+
110+
To run R code and visualize plots in Apache Zeppelin, you will need R on your master node (or your dev laptop).
111+
112+
+ For Centos: `yum install R R-devel libcurl-devel openssl-devel`
113+
+ For Ubuntu: `apt-get install r-base`
114+
115+
Validate your installation with a simple R command:
116+
117+
```
118+
R -e "print(1+1)"
119+
```
120+
121+
To enjoy plots, install additional libraries with:
122+
123+
```
124+
+ devtools with `R -e "install.packages('devtools', repos = 'http://cran.us.r-project.org')"`
125+
+ knitr with `R -e "install.packages('knitr', repos = 'http://cran.us.r-project.org')"`
126+
+ ggplot2 with `R -e "install.packages('ggplot2', repos = 'http://cran.us.r-project.org')"`
127+
+ Other vizualisation librairies: `R -e "install.packages(c('devtools','mplot', 'googleVis'), repos = 'http://cran.us.r-project.org'); require(devtools); install_github('ramnathv/rCharts')"`
128+
```
129+
130+
We recommend you to also install the following optional R libraries for happy data analytics:
131+
132+
+ glmnet
133+
+ pROC
134+
+ data.table
135+
+ caret
136+
+ sqldf
137+
+ wordcloud
138+

0 commit comments

Comments
 (0)