`summarise_each()`在R中已弃用

时间:2018-01-17 23:43:55

标签: r dplyr deprecated

这是我发布问题的第一次尝试,作为免责声明我是一个完整的'R'初学者,所以我提前为我在这里犯的任何错误道歉。

我有一个脚本我正在修改以在我的计算机上运行(我自己没有写它,它来自一篇文章的补充)我遇到了一些问题,第一个似乎是一个错误summarise_each()已弃用。这是我的代码,后跟错误:

library(dplyr)

scales<-plotMultiScale1(all_tracks, radius, xmax = max(radius), Resti = 1.9)

错误:

summarise_each() is deprecated.
Use summarise_all(), summarise_at() or summarise_if() instead.
To map funs over a selection of variables, use summarise_at()
Error in combine_vars(vars, ind_list) : Position must be between 0 and n

以下是控制台中打印出的“all_tracks”示例:

364 12.5102888 0.408184999 0.22795696 -0.1802280388 223.583333 12.5102888 0.408184999 0.22040897 -1.877760e-01
365 12.5102888 0.408184999 0.22795696 -0.1802280388 223.583333 12.5102888 0.408184999 0.22040897 -1.877760e-01
366 12.5102888 0.408184999 0.22795696 -0.1802280388 223.583333 12.5102888 0.408184999 0.22040897 -1.877760e-01
[ reached getOption("max.print") -- omitted 3185 rows ]

打印出来的是“半径”:

[[2]]
[1] 0.001 0.010 0.050 0.100 0.200 0.300 0.400 0.500 0.600 0.700 0.800 0.900 1.000 1.100 1.200 1.300 1.400 1.500 1.600 1.700 1.800 1.900 2.000 2.100 2.200 2.300 2.400 2.500 2.600 2.700
[31] 2.800 2.900 3.000 3.100 3.200 3.300 3.400 3.500 3.600 3.700 3.800 3.900 4.000 4.100 4.200 4.300 4.400 4.500 4.600 4.700 4.800 4.900 5.000

我在运行

后也收到此消息
>library(dplyr):

Attaching package: ‘dplyr’

The following objects are masked from ‘package:stats’:

filter, lag
The following objects are masked from ‘package:base’:

intersect, setdiff, setequal, union

我希望有足够的信息,非常感谢任何帮助。

0 个答案:

没有答案