RserveException:在Databrick上运行R时eval失败

RserveException:在Databrick上运行R时eval失败,r,apache-spark,R,Apache Spark,我对R没有任何经验,我正试图在Databricks笔记本中与Spark一起使用它来分析一些数据 我从这里开始学习教程 到目前为止,我有以下代码: sparkR.stop() sc <- sparkR.init() sqlContext <- sparkRSQL.init(sc) df <- createDataFrame(sqlContext, '/FileStore/tables/boanf7gu1466936449434/german.data') 是什么触发了这种情况

我对R没有任何经验,我正试图在Databricks笔记本中与Spark一起使用它来分析一些数据

我从这里开始学习教程

到目前为止,我有以下代码:

sparkR.stop()
sc <- sparkR.init()
sqlContext <- sparkRSQL.init(sc)

df <- createDataFrame(sqlContext, '/FileStore/tables/boanf7gu1466936449434/german.data')

是什么触发了这种情况?

在DataBricks中,已经有一个spark实例正在运行。所以,你不想阻止它

sparkR.stop() #This line of your code stops the existing spark instance. 
sc <- sparkR.init()  #You also don't need this to start a spark instance because you already have one.
sqlContext <- sparkRSQL.init(sc)
sparkR.stop()#这行代码将停止现有的spark实例。

sc它可能应该转到Databricks支持。就我而言,这里不支持创建自定义上下文,但我可能错了。您所说的自定义上下文是什么意思?我的意思是您正在停止提供的上下文并创建新的上下文。
sparkR.stop() #This line of your code stops the existing spark instance. 
sc <- sparkR.init()  #You also don't need this to start a spark instance because you already have one.
sqlContext <- sparkRSQL.init(sc)
spark_table <- SparkR::read.df(path = '/FileStore/tables/boanf7gu1466936449434/german.data', schema = NULL, na.strings = "NA")
r_table <- SparkR::as.data.frame(spark_table)