0

Input Data:

# 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

When I plot

plot(Conversion~TESTCELL_CONTENT, data=input)

I get this error: Error in plot.window(...) : need finite 'xlim' values

I checked for "na" and missing values. I limited to 11 records with complete data but still getting the error. Help?

  • 2
    What are you trying to plot? A character string vs a number? Are you sure you don't want to tabulate or aggregate this first? – thelatemail Mar 10 '17 at 00:07

1 Answers1

2

Convert your character to a factor and you can do it.

input$TESTCELL_CONTENT = factor(input$TESTCELL_CONTENT)

Same applies if this is a data frame rather than a "tibble".

Spacedman
  • 92,590
  • 12
  • 140
  • 224