问题描述
在运行于TERR 5.0的Spotfire 10.3中使用tidyverse函数时,出现此错误。
TIBCO Enterprise Runtime for R returned an error (4)
The data function 'BoM' could not be executed.
Error in is_vector(x) : could not find function "vec_init"
eval(expr,envir,enclos)
eval(expr,enclos)
df %>% mutate_if(is.numeric,as.character,is.factor,as.character) %>% pivot_longer(cols = everything(),withVisible(eval(quote(`_fseq`(`_lhs`)),env,env))
eval(expr,enclos)
`_fseq`(`_lhs`)
freduce(value,`_function_list`)
withVisible(function_list[[k]](value))
function_list[[k]](value)
pivot_longer(.,cols = everything(),names_to = c("Resource type",pivot_longer_spec(data,spec,names_repair = names_repair,set_names(vec_init(list(),length(values)),names(values))
set_names_impl(x,x,nm,...)
is_vector(x)
那是运行此代码的结果:
dfoutput <- df %>%
mutate_if(is.numeric,as.character) %>%
pivot_longer(
cols = everything(),names_to = c('Resource type','Input-Output','Resource','Property','.value'),values_to = "val",values_ptypes = list(val = 'character'),names_pattern = '(\\w.+) \\| (\\w.+) \\| (\\w.+) \\| (\\w.+) \\| (\\w.+)')
我已将vec_init
追溯到软件包vctrs
,并验证它已安装(在TERR 5.0中为vctrs 0.1.0
)
我还安装了tidyverse 1.3.0(最新版本为TERR 5.0)。
删除pivot_longer代码时,出现此错误:
TIBCO Enterprise Runtime for R returned an error (1)
The data function 'BoM' could not be executed.
Error in find.package(package) : there is no package called 'vctrs'
我将不胜感激!
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)