R分组时间index_by()。 index_by() 无法处理对象类型“tbl_df”、“tbl”、“data.frame”、“mts”、“#x27” ;ts'
** 问题 **
对属于 tsibbledata、vic_elec 一部分的数据集进行编码时遇到挑战。这 tsibble 库中的函数 index_by() 无法识别函数调用的任何数据格式。我尝试了 Windows 环境和使用 RCloud 的单独计算机,但均未成功,也出现相同的错误。
方法index_by() 无法处理任何对象类型,例如“tbl_df”、“tbl”、“data.frame”、“mts”、“ts”。尝试了几个小时甚至几天,尝试使用index_by()读取数据集时结果不一致。当删除index_by()函数时,我能够独立应用summary()。询问其他人,但没有人能够解决这么多对象格式上的 index_by() 错误问题。
** Index_by() 函数 [tbl_ts] 格式 **
使用 tsibbledata 提供的格式 [ tbl_ts [52,608 x 5] (S3: tbl_ts/tbl_df/tbl/data.frame) ]
没有应用于对象的方法类“tbl”、“tbe_df”、“data.frame”
** Index_by() 函数 tibble 格式 **
使用转换为 tibble 的工作,例如 as_tibble(vic_elec)、tibble 格式[tbl_df [52,608 x 5] (S3: tbl_df/tbl/data.frame) ]
没有方法应用于对象类“tbl”、“tbe_df”、“data.frame”
** 数据集的数据视图:'vic_elec' **
< a href="https://i.sstatic.net/H18aZ.png" rel="nofollow noreferrer">
** 环境 **
Windows, RStudio 版本 1.1.456 – © 2009-2018 RStudio, Inc. Mozilla/5.0 (Windows NT 6.2; Win64; x64) AppleWebKit/538.1 (KHTML, 如 Gecko) rstudio Safari/538.1 Qt/5.6.2
RCloud
** Problem **
Having challenge to code to dataset that is part of tsibbledata, vic_elec. The
Function index_by(), library tsibble, is not recognizing any data formats for function invocation. I have tried in vain both my Windows environment and a separate computer using RCloud, as with the same error.
The method, index_by() has failed to work on any object type, e.g, 'tbl_df', 'tbl', 'data.frame', 'mts', 'ts'. Have tried for hours even days, had inconsistent outcomes in trying to read dataset with index_by(). I was able to independently apply summarize() when removing index_by() function. Ask other but no one has been able to solve error issue with index_by() on so many object formats.
** Index_by() function [tbl_ts] format **
Effort using tsibbledata supplied format [ tbl_ts [52,608 x 5] (S3: tbl_ts/tbl_df/tbl/data.frame) ]
No method applied to object class 'tbl', 'tbe_df', 'data.frame'
** Index_by() function tibble format **
Effort using cast to tibble, eg., as_tibble(vic_elec), tibble format [tbl_df [52,608 x 5] (S3: tbl_df/tbl/data.frame) ]
No method applied to object class 'tbl', 'tbe_df', 'data.frame'
** Data view for dataset: 'vic_elec' **
** Environment **
Windows, RStudio version 1.1.456 – © 2009-2018 RStudio, Inc.
Mozilla/5.0 (Windows NT 6.2; Win64; x64) AppleWebKit/538.1 (KHTML, like Gecko) rstudio Safari/538.1 Qt/5.6.2
RCloud
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
问题和问题是由于函数名称覆盖造成的。我在库列表中提前加载了一个库,然后在队列中加载了一个稍后加载下一个库的库,其中一个函数显然覆盖了早期队列加载的库。当我反转了几个关键的库,并最小化了程序早期不需要的一些库时,这种库的反转并没有覆盖函数,并且代码问题得到了解决。
The problem and issue was due to function name overriding. I had a library loaded early in the list of libraries, then following, a later on the queue for loading next libraries, one of the functions apparently overrode the early queue loaded library. When I reversed a few key libraries, and minimizing some libraries that were not needed in early in the program, this reversal of libraries then did not override the functions, and the code problem issue was solved.