2017-08-02 78 views
0

我相信有一种方法可以在不编写R脚本的情况下在Spotfire中生成相关值,但是我想了解为什么下面的代码没有在Spotfire中运行。我也尝试将统计信息和基础库加载到Spotfire中无济于事。如何使用R脚本在Spotfire中生成相关值

下面的脚本是:

output <- cor(input1, input2)

错误消息如下:

TIBCO Enterprise Runtime for R returned an error: 'Error in library(pkg, character.only = TRUE) : there is no package called 'correlation''.

+0

尝试'统计:: COR(输入1,输入2)'? – Stedy

+0

这是有效的!谢谢Stedy! –

回答

1

请告诉我最有可能的情况是,Tibco的具有预安装的软件包叫做相关掩盖功能cor()。从统计库调用它:

stats::cor(input1,input2)

相关问题