[英]Error: Problem with `summarise()` input `wt`: geom_net function incompatible with new dplyr version
I'm using geom_net
function from geom_net
R package.我正在使用
geom_net
R 包中的geom_net
函数。
Until few months ago I could use the geom_net
function with non problems, but now I get the following error:直到几个月前,我还可以
geom_net
地使用geom_net
函数,但现在出现以下错误:
Error: Problem with `summarise()` input `wt`.
x could not find function "n"
ℹ Input `wt` is `n()`.
ℹ The error occured in group 1:
My understanding of the error is that the summarise()
function of dplyr
package no longer uses the argument wt=n()
as also specified in the dlyr
R package recent update.我对错误的理解是
dplyr
包的summarise()
函数不再使用参数wt=n()
,这也在dlyr
R 包最近更新中指定。
The problem is that geom_net
uses a (now) old version of summarise()
which is now incompatible with the new dplyr
version.问题是
geom_net
使用(现在)旧版本的summarise()
现在与新的dplyr
版本不兼容。
Do you have any suggestion on how to solve the problem?你对如何解决这个问题有什么建议吗?
It looks like there's exactly one line in the geom_net
source code that uses dplyr::summarise()
with the wt
argument:看起来
geom_net
源代码中只有一行使用dplyr::summarise()
和wt
参数:
edges <- dplyr::summarise(edges, wt = n())
And the dplyr
change log notes that wt
is not replaced by anything, you can just omit it.并且
dplyr
更改日志指出wt
没有被任何东西替换,您可以省略它。
Use of wt = n() is now deprecated;
现在不推荐使用 wt = n(); now just omit the wt argument.
现在只需省略 wt 参数。
You should be able to just modify your local version of the geom_net
package.您应该能够修改
geom_net
包的本地版本。 Remove the wt
argument from that single line.从那一行中删除
wt
参数。
(Note that this won't necessarily guarantee that geom_net
runs without error, just that it resolves the specific issue you're asking about here.) (请注意,这不一定保证
geom_net
运行没有错误,只是它解决了您在此处询问的特定问题。)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.