0

I am currently following a tutorial to graph some data using qichart2. When I input the code, it creates a List instead of a graph. The same thing happened to me previously when I was trying to follow a plotly tutorial.

ControlChart <- qic(Force,
                    data = HudsonData,
                    chart = 'i',
                    title = NULL,
                    xlab  = NULL,
                    x = TimeStamp, 
                    ncol = 1,
                    show.labels = TRUE,
                    point.size = 3,
                    scales = "free_y",
                    facets = ~ Limb)

This creates a List of 9 instead of a plot like it did in the tutorial.

Is there something I have set up in my R Studio that is creating Lists instead of plots? When I use ggplot2 plots work fine.

Let me know if more info is needed that would be helpful.

vb66
  • 353
  • 3
  • 14
  • What does `plot(ControlChart)` do? – Jason Aug 09 '19 at 00:35
  • Ohh interesting. It creates the plot! Why didn't it do that with the original code on its own? – vb66 Aug 09 '19 at 01:17
  • That is interesting, because I don't need to do that on my R session. Running `example(qic)` plotted every time and doesn't use `plot()`. I get the plot when I type `qic(y)`. – Jason Aug 09 '19 at 01:36
  • Have you tried the software engineers' secret weapon? Shut down and restart R, preferably with an empty environment. – Jason Aug 09 '19 at 01:37
  • I started from scratch with empty scripts and environment and still had to do the plot(ControlChart) at the end to get the plot. Was hoping that would work! I just did qic(y) and a plot came up right away though? – vb66 Aug 09 '19 at 02:18
  • Maybe something in the tutorial messes with the graphics settings? If you restart from scratch again and don't do the tutorial, does `library(qicharts2)` then `example(qic)` work? – Jason Aug 09 '19 at 06:36
  • Yes that works. It created a y value and then gave me this message: qic> # Lock random number generator to make reproducible results. qic> set.seed(2) qic> # Generate vector of 24 random normal numbers qic> y <- rnorm(24) qic> # Run chart qic> qic(y) Hit to see next plot: – vb66 Aug 09 '19 at 21:55
  • Yep, that looks fine.The "hit return to see.." part is a system plotting option. It should reset to normal plotting behaviour after the example has run. – Jason Aug 09 '19 at 22:08

0 Answers0