SparkR 函数在数据块中失败

问题描述 投票:0回答:1

我不是 R 用户,但我需要使用 SparkR 进行一些分析,并且我正在尝试运行下面的代码。管道是这里的问题吗?

table %>%
SparkR::select('station') %>%
SparkR::count_distinct()

但收到错误消息:

(function (classes, fdef, mtable) 中的错误:无法为签名“SparkDataFrame”找到函数“count_distinct”的继承方法

也尝试过这些都没有用。

SparkR::select(table, table$STATION) %>% 
SparkR::countDistinct()
SparkR::select(table, table$STATION) %>% 
SparkR::count_distinct()
sparkr
1个回答
0
投票
select(table, count_distinct(table$STATION))
© www.soinside.com 2019 - 2024. All rights reserved.