Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
453 changes: 155 additions & 298 deletions notebook/r/note.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -292,9 +292,11 @@ object RContext {
val portsFile = File.createTempFile("rscala-", "")
val processInstance = processCmd.run(processIO)
// Find rzeppelin
val libpath : String = if (Files.exists(Paths.get("R/lib"))) "R/lib"
val basePath : String = SparkInterpreter.getSystemDefault("ZEPPELIN_HOME", "zeppelin.home", "./")
val libpath : String = if (Files.exists(Paths.get(basePath + "R/lib"))) basePath + "R/lib"
else if (Files.exists(Paths.get("R/lib"))) "R/lib"
else if (Files.exists(Paths.get("../R/lib"))) "../R/lib"
else throw new RuntimeException("Could not find rzeppelin - it must be in either R/lib or ../R/lib")
else throw new RuntimeException("Could not find rzeppelin - it should be in either $ZEPPELIN_HOME/R/lib, ./R/lib or ../R/lib")
val snippet =
s"""
library(lib.loc="$libpath", rzeppelin)
Expand All @@ -317,5 +319,4 @@ q(save='no')"""
contextMap.put(id, context)
context
}
}

}