【问题标题】:Error in plot.window(...) : need finite 'xlim' values in plot [duplicate]plot.window(...) 中的错误:在图中需要有限的“xlim”值 [重复]
【发布时间】:2017-03-09 23:47:41
【问题描述】:

输入数据:

# A tibble: 11 × 2
                                       TESTCELL_CONTENT Conversion
                                                  <chr>      <dbl>
1         PRGRS_00_00215_Recipe:Classic Chicken Pot Pie          2
2            PRGRS_00_00215_Recipe:Smothered Pork Chops          6
3      PBCRS_00_00215_Recipe:Easy Crescent Veggie Pizza          2
4  PRGRS_00_00215_Recipe:Cheesy Potato Slow-Cooker Soup          2
5              PRGRS_00_00211_Recipe:Loaded Potato Soup          3
6              PBSWT_00_00215_Recipe:Apple Pie Cupcakes          4
7              PRGRS_00_00215_Recipe:Loaded Potato Soup          4
8                 PRGRS_00_00215_Recipe:Chicken Marsala          5
9        PRGRS_00_00215_Recipe:Slow-Cooker Lasagna Soup          4
10                PBCRS_00_00215_Recipe:Pizza Pinwheels          2
11           PBCRS_00_00215_Recipe:Raspberry Baked Brie          3

当我绘图时

plot(Conversion~TESTCELL_CONTENT, data=input)

我收到此错误: plot.window(...) 中的错误:需要有限的“xlim”值

我检查了“na”和缺失值。我限制了 11 条具有完整数据的记录,但仍然出现错误。帮忙?

【问题讨论】:

  • 你想画什么?字符串与数字?您确定不想先将其制成表格或汇总吗?

标签: r plot


【解决方案1】:

将你的角色转换为一个因素,你可以做到。

input$TESTCELL_CONTENT = factor(input$TESTCELL_CONTENT)

如果这是一个数据框而不是“tibble”,则同样适用。

【讨论】:

    猜你喜欢
    • 2014-02-16
    • 1970-01-01
    • 1970-01-01
    • 2021-12-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-03-04
    相关资源
    最近更新 更多