gpt4 book ai didi

r - 非标准文件 "data-raw"有关在 R 中构建/检查包的说明

转载 作者:行者123 更新时间:2023-12-02 00:10:28 24 4
gpt4 key购买 nike

我收到此警告

Non-standard file/directory found at top level:
‘data-raw’

在构建我的包时,甚至建议创建此文件夹来创建包数据 http://r-pkgs.had.co.nz/data.html#data-sysdata

对此有何评论,或者我是否需要特定设置来消除此消息。

最佳答案

使用时,应将data-raw添加到.Rbuildignore中。正如 Data section of Hadley's R-Packages book 中所述(也在问题中链接)

Often, the data you include in data/ is a cleaned up version of raw data you’ve gathered from elsewhere. I highly recommend taking the time to include the code used to do this in the source version of your package. This will make it easy for you to update or reproduce your version of the data. I suggest that you put this code in data-raw/. You don’t need it in the bundled version of your package, so also add it to .Rbuildignore. Do all this in one step with:

usethis::use_data_raw()

关于r - 非标准文件 "data-raw"有关在 R 中构建/检查包的说明,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41855970/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com