R和tableau做结合出错

我现在要把R和tableau做结合,计算字段如下:
SCRIPT_REAL("fit <- kmeans(data.frame(.arg1,.arg2,.arg3,.arg4),centers=3);
fit$cluster",
SUM([Discount]),SUM([Profit]),SUM([Quantity]),SUM([Sales]))
在执行过程中出现如下错误:
无法完成操作
与 RServe 服务 通信时出错。
Error in sample.int(m, k) :
cannot take a sample larger than the population when 'replace = FALSE'
请教下R大神,这个问题怎么解决?求详细解答

Error in sample.int(m, k) :
cannot take a sample larger than the population when 'replace = FALSE'