Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

P Charts do not carry limits through #48

Open
jrollman123 opened this issue Jun 18, 2021 · 0 comments
Open

P Charts do not carry limits through #48

jrollman123 opened this issue Jun 18, 2021 · 0 comments

Comments

@jrollman123
Copy link

When trying to plot new data on the set control limit lines, if you use anything but the XmR option, the control limits only show for the "Setup"/"pre_change"

#Data Generation
dat_i <- data.frame(mnth = 1:24,
r_cnt = rbinom(24,100,prob = p_red),
DataType = "pre_change"
)
dat_i$r_p = dat_i$r_cnt/100

dat_n <-
data.frame(mnth = 25:36,
r_cnt = rbinom(24,100,prob = .15),
DataType = "post_change"
)
dat_n$r_p = dat_n$r_cnt/100
dat_all <- rbind(dat_i,dat_n)

#Plotting the Data
P_Plot <-
ggplot(dat_all, aes(x = mnth, y = r_p, n = 100)) +
geom_point() + geom_line() +
stat_QC(data = dat_all[dat_all$DataType=="pre_change",],
method = "p",
auto.label = T,
label.digits = 2,
show.1n2.sigma = T
) +
scale_x_continuous(expand = expansion(mult = .15))

P_Plot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant