【问题标题】:Is there something wrong with this Filter function code in R?R中的这个Filter函数代码有问题吗?
【发布时间】:2022-07-19 12:44:00
【问题描述】:

我正在尝试通过 R 中“supp”的“dose”来归档“ToothGrowth”数据集,但我收到了下面提到的错误。请帮忙。

代码:

install.packages("dplyr")
data("ToothGrowth")
View(ToothGrowth)
filtered_tg <- filter(ToothGrowth, dose==0.5)
View (filtered_tg)

错误:

过滤器错误(ToothGrowth,剂量 == 0.5):找不到对象“剂量”

查看 (filtered_tg)enter image description here

【问题讨论】:

    标签: r


    【解决方案1】:

    你需要library(dplyr),而不是install.packages("dplyr")

    【讨论】:

      猜你喜欢
      • 2020-08-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-01-22
      • 2018-09-09
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多