[tidy]: 软件包“tidy”不可用

[tidy]: package 'tidy' is not available

提问人:Yasin Amini 提问时间:11/8/2023 最后编辑:Yasin Amini 更新时间:11/10/2023 访问量:51

问:

我收到此错误

The following package(s) were not installed successfully:
- [tidy]: package 'tidy' is not available
You may need to manually download and install these packages.

 while running `renv::init()`

2: Discard the lockfile and re-initialize the project

找不到任何名为 tidy 的包。我尝试安装 tidyverse 和 tidyr,但没有机会。

这是我的renv.lock文件:

{
  "R": {
    "Version": "4.3.1",
    "Repositories": [
      {
        "Name": "CRAN",
        "URL": "https://packagemanager.posit.co/cran/latest"
      }
    ]
  },
  "Packages": {
    "DBI": {
      "Package": "DBI",
      "Version": "1.1.3",
      "Source": "Repository",
      "Repository": "CRAN",
      "Requirements": [
        "R",
        "methods"
      ],
      "Hash": "b2866e62bab9378c3cc9476a1954226b"
    },
    "R6": {
      "Package": "R6",
      "Version": "2.5.1",
      "Source": "Repository",
      "Repository": "CRAN",
      "Requirements": [
        "R"
      ],
      "Hash": "470851b6d5d0ac559e9d01bb352b4021"
    },
    "Rcpp": {
      "Package": "Rcpp",
      "Version": "1.0.11",
      "Source": "Repository",
      "Repository": "CRAN",
      "Requirements": [
        "methods",
        "utils"
      ],
      "Hash": "ae6cbbe1492f4de79c45fce06f967ce8"
    },
    "assertthat": {
      "Package": "assertthat",
      "Version": "0.2.1",
      "Source": "Repository",
      "Repository": "CRAN",
      "Requirements": [
        "tools"
      ],
      "Hash": "50c838a310445e954bc13f26f26a6ecf"
    },
    "bit": {
      "Package": "bit",
      "Version": "4.0.5",
      "Source": "Repository",
      "Repository": "CRAN",
      "Requirements": [
        "R"
      ],
      "Hash": "d242abec29412ce988848d0294b208fd"
    },
    "bit64": {
      "Package": "bit64",
      "Version": "4.0.5",
      "Source": "Repository",
      "Repository": "CRAN",
      "Requirements": [
        "R",
        "bit",
        "methods",
        "stats",
        "utils"
      ],
      "Hash": "9fe98599ca456d6552421db0d6772d8f"
    },
    "blob": {
      "Package": "blob",
      "Version": "1.2.4",
      "Source": "Repository",
      "Repository": "CRAN",
      "Requirements": [
        "methods",
        "rlang",
        "vctrs"
      ],
      "Hash": "40415719b5a479b87949f3aa0aee737c"
    },
    "cli": {
      "Package": "cli",
      "Version": "3.6.1",
      "Source": "Repository",
      "Repository": "CRAN",
      "Requirements": [
        "R",
        "utils"
      ],
      "Hash": "89e6d8219950eac806ae0c489052048a"
    },
    "clipr": {
      "Package": "clipr",
      "Version": "0.8.0",
      "Source": "Repository",
      "Repository": "CRAN",
      "Requirements": [
        "utils"
      ],
      "Hash": "3f038e5ac7f41d4ac41ce658c85e3042"
    },
    "codetools": {
      "Package": "codetools",
      "Version": "0.2-19",
      "Source": "Repository",
      "Repository": "CRAN",
      "Requirements": [
        "R"
      ],
      "Hash": "c089a619a7fae175d149d89164f8c7d8"
    },
    "config": {
      "Package": "config",
      "Version": "0.3.2",
      "Source": "Repository",
      "Repository": "CRAN",
      "Requirements": [
        "yaml"
      ],
      "Hash": "8b7222e9d9eb5178eea545c0c4d33fc2"
    },
    "cpp11": {
      "Package": "cpp11",
      "Version": "0.4.6",
      "Source": "Repository",
      "Repository": "CRAN",
      "Requirements": [
        "R"
      ],
      "Hash": "707fae4bbf73697ec8d85f9d7076c061"
    },
    "crayon": {
      "Package": "crayon",
      "Version": "1.5.2",
      "Source": "Repository",
      "Repository": "CRAN",
      "Requirements": [
        "grDevices",
        "methods",
        "utils"
      ],
      "Hash": "e8a1e41acf02548751f45c718d55aa6a"
    },
    "curl": {
      "Package": "curl",
      "Version": "5.1.0",
      "Source": "Repository",
      "Repository": "CRAN",
      "Requirements": [
        "R"
      ],
      "Hash": "9123f3ef96a2c1a93927d828b2fe7d4c"
    },
    "data.table": {
      "Package": "data.table",
      "Version": "1.14.8",
      "Source": "Repository",
      "Repository": "CRAN",
      "Requirements": [
        "R",
        "methods"
      ],
      "Hash": "b4c06e554f33344e044ccd7fdca750a9"
    },
    "dbplyr": {
      "Package": "dbplyr",
      "Version": "2.3.0",
      "Source": "Repository",
      "Repository": "CRAN",
      "Requirements": [
        "DBI",
        "R",
        "R6",
        "assertthat",
        "blob",
        "cli",
        "dplyr",
        "glue",
        "lifecycle",
        "magrittr",
        "methods",
        "pillar",
        "purrr",
        "rlang",
        "tibble",
        "tidyselect",
        "utils",
        "vctrs",
        "withr"
      ],
      "Hash": "f03e0e456f1cb7b068772af43772baea"
    },
    "digest": {
      "Package": "digest",
      "Version": "0.6.33",
      "Source": "Repository",
      "Repository": "CRAN",
      "Requirements": [
        "R",
        "utils"
      ],
      "Hash": "b18a9cf3c003977b0cc49d5e76ebe48d"
    },
    "dplyr": {
      "Package": "dplyr",
      "Version": "1.1.3",
      "Source": "Repository",
      "Repository": "RSPM",
      "Requirements": [
        "R",
        "R6",
        "cli",
        "generics",
        "glue",
        "lifecycle",
        "magrittr",
        "methods",
        "pillar",
        "rlang",
        "tibble",
        "tidyselect",
        "utils",
        "vctrs"
      ],
      "Hash": "e85ffbebaad5f70e1a2e2ef4302b4949"
    },
    "ellipsis": {
      "Package": "ellipsis",
      "Version": "0.3.2",
      "Source": "Repository",
      "Repository": "CRAN",
      "Requirements": [
        "R",
        "rlang"
      ],
      "Hash": "bb0eec2fe32e88d9e2836c2f73ea2077"
    },
    "fansi": {
      "Package": "fansi",
      "Version": "1.0.4",
      "Source": "Repository",
      "Repository": "CRAN",
      "Requirements": [
        "R",
        "grDevices",
        "utils"
      ],
      "Hash": "1d9e7ad3c8312a192dea7d3db0274fde"
    },
    "fastmap": {
      "Package": "fastmap",
      "Version": "1.1.1",
      "Source": "Repository",
      "Repository": "CRAN",
      "Hash": "f7736a18de97dea803bde0a2daaafb27"
    },
    "future": {
      "Package": "future",
      "Version": "1.33.0",
      "Source": "Repository",
      "Repository": "CRAN",
      "Requirements": [
        "digest",
        "globals",
        "listenv",
        "parallel",
        "parallelly",
        "utils"
      ],
      "Hash": "8e92c7bc53e91b9bb1faf9a6ef0e8514"
    },
    "generics": {
      "Package": "generics",
      "Version": "0.1.3",
      "Source": "Repository",
      "Repository": "CRAN",
      "Requirements": [
        "R",
        "methods"
      ],
      "Hash": "15e9634c0fcd294799e9b2e929ed1b86"
    },
    "globals": {
      "Package": "globals",
      "Version": "0.16.2",
      "Source": "Repository",
      "Repository": "CRAN",
      "Requirements": [
        "R",
        "codetools"
      ],
      "Hash": "baa9585ab4ce47a9f4618e671778cc6f"
    },
    "glue": {
      "Package": "glue",
      "Version": "1.6.2",
      "Source": "Repository",
      "Repository": "CRAN",
      "Requirements": [
        "R",
        "methods"
      ],
      "Hash": "4f2596dfb05dac67b9dc558e5c6fba2e"
    },
    "hms": {
      "Package": "hms",
      "Version": "1.1.3",
      "Source": "Repository",
      "Repository": "CRAN",
      "Requirements": [
        "lifecycle",
        "methods",
        "pkgconfig",
        "rlang",
        "vctrs"
      ],
      "Hash": "b59377caa7ed00fa41808342002138f9"
    },
    "httpuv": {
      "Package": "httpuv",
      "Version": "1.6.11",
      "Source": "Repository",
      "Repository": "CRAN",
      "Requirements": [
        "R",
        "R6",
        "Rcpp",
        "later",
        "promises",
        "utils"
      ],
      "Hash": "838602f54e32c1a0f8cc80708cefcefa"
    },
    "jsonlite": {
      "Package": "jsonlite",
      "Version": "1.8.7",
      "Source": "Repository",
      "Repository": "CRAN",
      "Requirements": [
        "methods"
      ],
      "Hash": "266a20443ca13c65688b2116d5220f76"
    },
    "later": {
      "Package": "later",
      "Version": "1.3.1",
      "Source": "Repository",
      "Repository": "CRAN",
      "Requirements": [
        "Rcpp",
        "rlang"
      ],
      "Hash": "40401c9cf2bc2259dfe83311c9384710"
    },
    "lifecycle": {
      "Package": "lifecycle",
      "Version": "1.0.3",
      "Source": "Repository",
      "Repository": "CRAN",
      "Requirements": [
        "R",
        "cli",
        "glue",
        "rlang"
      ],
      "Hash": "001cecbeac1cff9301bdc3775ee46a86"
    },
    "listenv": {
      "Package": "listenv",
      "Version": "0.9.0",
      "Source": "Repository",
      "Repository": "CRAN",
      "Requirements": [
        "R"
      ],
      "Hash": "4fbd3679ec8ee169ba28d4b1ea7d0e8f"
    },
    "magrittr": {
      "Package": "magrittr",
      "Version": "2.0.3",
      "Source": "Repository",
      "Repository": "CRAN",
      "Requirements": [
        "R"
      ],
      "Hash": "7ce2733a9826b3aeb1775d56fd305472"
    },
    "mime": {
      "Package": "mime",
      "Version": "0.12",
      "Source": "Repository",
      "Repository": "CRAN",
      "Requirements": [
        "tools"
      ],
      "Hash": "18e9c28c1d3ca1560ce30658b22ce104"
    },
    "mvtnorm": {
      "Package": "mvtnorm",
      "Version": "1.2-3",
      "Source": "Repository",
      "Repository": "CRAN",
      "Requirements": [
        "R",
        "stats"
      ],
      "Hash": "463b268710930f7bffef33147400966a"
    },
    "odbc": {
      "Package": "odbc",
      "Version": "1.3.5",
      "Source": "Repository",
      "Repository": "RSPM",
      "Requirements": [
        "DBI",
        "R",
        "Rcpp",
        "bit64",
        "blob",
        "hms",
        "methods",
        "rlang"
      ],
      "Hash": "d42c4f464e14ce542718a17525265e05"
    },
    "parallelly": {
      "Package": "parallelly",
      "Version": "1.36.0",
      "Source": "Repository",
      "Repository": "CRAN",
      "Requirements": [
        "parallel",
        "tools",
        "utils"
      ],
      "Hash": "bca377e1c87ec89ebed77bba00635b2e"
    },
    "pillar": {
      "Package": "pillar",
      "Version": "1.9.0",
      "Source": "Repository",
      "Repository": "CRAN",
      "Requirements": [
        "cli",
        "fansi",
        "glue",
        "lifecycle",
        "rlang",
        "utf8",
        "utils",
        "vctrs"
      ],
      "Hash": "15da5a8412f317beeee6175fbc76f4bb"
    },
    "pkgconfig": {
      "Package": "pkgconfig",
      "Version": "2.0.3",
      "Source": "Repository",
      "Repository": "CRAN",
      "Requirements": [
        "utils"
      ],
      "Hash": "01f28d4278f15c76cddbea05899c5d6f"
    },
    "plumber": {
      "Package": "plumber",
      "Version": "1.2.1",
      "Source": "Repository",
      "Repository": "CRAN",
      "Requirements": [
        "R",
        "R6",
        "crayon",
        "ellipsis",
        "httpuv",
        "jsonlite",
        "lifecycle",
        "magrittr",
        "mime",
        "promises",
        "rlang",
        "sodium",
        "stringi",
        "swagger",
        "webutils"
      ],
      "Hash": "8b65a7a00ef8edc5ddc6fabf0aff1194"
    },
    "prettyunits": {
      "Package": "prettyunits",
      "Version": "1.2.0",
      "Source": "Repository",
      "Repository": "CRAN",
      "Requirements": [
        "R"
      ],
      "Hash": "6b01fc98b1e86c4f705ce9dcfd2f57c7"
    },
    "progress": {
      "Package": "progress",
      "Version": "1.2.2",
      "Source": "Repository",
      "Repository": "CRAN",
      "Requirements": [
        "R6",
        "crayon",
        "hms",
        "prettyunits"
      ],
      "Hash": "14dc9f7a3c91ebb14ec5bb9208a07061"
    },
    "promises": {
      "Package": "promises",
      "Version": "1.2.1",
      "Source": "Repository",
      "Repository": "CRAN",
      "Requirements": [
        "R6",
        "Rcpp",
        "fastmap",
        "later",
        "magrittr",
        "rlang",
        "stats"
      ],
      "Hash": "0d8a15c9d000970ada1ab21405387dee"
    },
    "purrr": {
      "Package": "purrr",
      "Version": "1.0.2",
      "Source": "Repository",
      "Repository": "CRAN",
      "Requirements": [
        "R",
        "cli",
        "lifecycle",
        "magrittr",
        "rlang",
        "vctrs"
      ],
      "Hash": "1cba04a4e9414bdefc9dcaa99649a8dc"
    },
    "readr": {
      "Package": "readr",
      "Version": "2.1.4",
      "Source": "Repository",
      "Repository": "CRAN",
      "Requirements": [
        "R",
        "R6",
        "cli",
        "clipr",
        "cpp11",
        "crayon",
        "hms",
        "lifecycle",
        "methods",
        "rlang",
        "tibble",
        "tzdb",
        "utils",
        "vroom"
      ],
      "Hash": "b5047343b3825f37ad9d3b5d89aa1078"
    },
    "renv": {
      "Package": "renv",
      "Version": "1.0.3",
      "Source": "Repository",
      "Repository": "CRAN",
      "Requirements": [
        "utils"
      ],
      "Hash": "41b847654f567341725473431dd0d5ab"
    },
    "rlang": {
      "Package": "rlang",
      "Version": "1.1.1",
      "Source": "Repository",
      "Repository": "CRAN",
      "Requirements": [
        "R",
        "utils"
      ],
      "Hash": "a85c767b55f0bf9b7ad16c6d7baee5bb"
    },
    "sodium": {
      "Package": "sodium",
      "Version": "1.3.0",
      "Source": "Repository",
      "Repository": "CRAN",
      "Hash": "bd436c1e48dc1982125e4d955017724e"
    },
    "splitstackshape": {
      "Package": "splitstackshape",
      "Version": "1.4.8",
      "Source": "Repository",
      "Repository": "CRAN",
      "Requirements": [
        "R",
        "data.table"
      ],
      "Hash": "69b26ceb9f7976f347049b4d470c2d65"
    },
    "stringi": {
      "Package": "stringi",
      "Version": "1.7.12",
      "Source": "Repository",
      "Repository": "CRAN",
      "Requirements": [
        "R",
        "stats",
        "tools",
        "utils"
      ],
      "Hash": "ca8bd84263c77310739d2cf64d84d7c9"
    },
    "stringr": {
      "Package": "stringr",
      "Version": "1.5.0",
      "Source": "Repository",
      "Repository": "CRAN",
      "Requirements": [
        "R",
        "cli",
        "glue",
        "lifecycle",
        "magrittr",
        "rlang",
        "stringi",
        "vctrs"
      ],
      "Hash": "671a4d384ae9d32fc47a14e98bfa3dc8"
    },
    "swagger": {
      "Package": "swagger",
      "Version": "3.33.1",
      "Source": "Repository",
      "Repository": "CRAN",
      "Hash": "f28d25ed70c903922254157c11b0081d"
    },
    "tibble": {
      "Package": "tibble",
      "Version": "3.2.1",
      "Source": "Repository",
      "Repository": "CRAN",
      "Requirements": [
        "R",
        "fansi",
        "lifecycle",
        "magrittr",
        "methods",
        "pillar",
        "pkgconfig",
        "rlang",
        "utils",
        "vctrs"
      ],
      "Hash": "a84e2cc86d07289b3b6f5069df7a004c"
    },
    "tidyr": {
      "Package": "tidyr",
      "Version": "1.3.0",
      "Source": "Repository",
      "Repository": "CRAN",
      "Requirements": [
        "R",
        "cli",
        "cpp11",
        "dplyr",
        "glue",
        "lifecycle",
        "magrittr",
        "purrr",
        "rlang",
        "stringr",
        "tibble",
        "tidyselect",
        "utils",
        "vctrs"
      ],
      "Hash": "e47debdc7ce599b070c8e78e8ac0cfcf"
    },
    "tidyselect": {
      "Package": "tidyselect",
      "Version": "1.2.0",
      "Source": "Repository",
      "Repository": "CRAN",
      "Requirements": [
        "R",
        "cli",
        "glue",
        "lifecycle",
        "rlang",
        "vctrs",
        "withr"
      ],
      "Hash": "79540e5fcd9e0435af547d885f184fd5"
    },
    "tzdb": {
      "Package": "tzdb",
      "Version": "0.4.0",
      "Source": "Repository",
      "Repository": "CRAN",
      "Requirements": [
        "R",
        "cpp11"
      ],
      "Hash": "f561504ec2897f4d46f0c7657e488ae1"
    },
    "utf8": {
      "Package": "utf8",
      "Version": "1.2.3",
      "Source": "Repository",
      "Repository": "CRAN",
      "Requirements": [
        "R"
      ],
      "Hash": "1fe17157424bb09c48a8b3b550c753bc"
    },
    "vctrs": {
      "Package": "vctrs",
      "Version": "0.6.3",
      "Source": "Repository",
      "Repository": "CRAN",
      "Requirements": [
        "R",
        "cli",
        "glue",
        "lifecycle",
        "rlang"
      ],
      "Hash": "d0ef2856b83dc33ea6e255caf6229ee2"
    },
    "vroom": {
      "Package": "vroom",
      "Version": "1.6.4",
      "Source": "Repository",
      "Repository": "CRAN",
      "Requirements": [
        "R",
        "bit64",
        "cli",
        "cpp11",
        "crayon",
        "glue",
        "hms",
        "lifecycle",
        "methods",
        "progress",
        "rlang",
        "stats",
        "tibble",
        "tidyselect",
        "tzdb",
        "vctrs",
        "withr"
      ],
      "Hash": "9db52c1656cf19c124f93124ea57f0fd"
    },
    "webutils": {
      "Package": "webutils",
      "Version": "1.1",
      "Source": "Repository",
      "Repository": "CRAN",
      "Requirements": [
        "curl",
        "jsonlite"
      ],
      "Hash": "75d8b5b05fe22659b54076563f83f26a"
    },
    "withr": {
      "Package": "withr",
      "Version": "2.5.0",
      "Source": "Repository",
      "Repository": "CRAN",
      "Requirements": [
        "R",
        "grDevices",
        "graphics",
        "stats"
      ],
      "Hash": "c0e49a9760983e81e55cdd9be92e7182"
    },
    "yaml": {
      "Package": "yaml",
      "Version": "2.3.7",
      "Source": "Repository",
      "Repository": "CRAN",
      "Hash": "0d0056cc5383fbc240ccd0cb584bf436"
    }
  }
}

这是我尝试安装的 renv.lock 文件。运行renv::init()后,我收到我提到的错误。正如你所看到的,它没有什么叫做整洁的。

r tidyr renv

评论

0赞 Phil 11/8/2023
你说的没有机会是什么意思?尝试安装 tidyr 后出现什么错误?
2赞 MrFlick 11/8/2023
为什么要安装名为“tidy”的软件包?你在运行什么?据我所知,没有那个名字的包。也许你的意思是“tidyr”?您需要使用 renv 锁定文件。这个锁定文件是从哪里来的?是你自己创造的吗?
0赞 Yasin Amini 11/8/2023
我的意思是我得到了同样的错误。
0赞 Yasin Amini 11/8/2023
@MrFlick这正是我不明白的。没有称为 tidy 的包。我会将我的 renv.lock 文件附加到问题中
2赞 Nir Graham 11/9/2023
我做了一个新的 R 项目,我添加了你的 renv.lock 作为唯一的文件,然后 renv::restored。我得到了所有列出的库,没有问题,在任何阶段都没有引用名为 tidy 的库。;我建议你试试这个

答:

1赞 Kevin Ushey 11/10/2023 #1

您的项目中可能有一些代码,其形式如下:

library(tidy)

或者也许

tidy::example()

因此,推断您的项目依赖于一个名为 的包。我建议您阅读入门指南以了解更多信息。renvtidy