[英]Warning occurs when using nest
tbl = tibble(a = c(1,2), b = c(3,4))
tbl2 = tibble(id = 1, t = nest(tbl) %>% flatten())
如上代码,我可以将tbl
作为一个元素放入tbl2
,但是
警告信息显示
`...` must not be empty for ungrouped data frames. Did you want `data = everything()`?Warning message:
你能告诉我怎么做才能忽略警告信息吗?
为了通过警告中的提示获得@Sotos 提出的解决方案,请使用nest
命令的(显然未记录的)选项,如下所示:
tbl2 = tibble(id = 1, t = nest(tbl, data=everything()) %>% flatten())
可能值得注意(稍微偏离主题), unnest
命令也存在此选项。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.