Last active
January 22, 2020 16:18
-
-
Save rsalaza4/8c5f86761ebdc1b58ca65153f54c1158 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import the qcc library | |
library(qcc) | |
# Create the defects data column | |
defects <- as.integer(rnorm(50, 3, 1)) | |
# Create the sample size data column | |
sample_size <- as.integer(rep(20, 50)) | |
# Create a data frame with both columns | |
df <- data.frame(defects, sample_size) | |
# Create the np-chart | |
np_chart <- with(df, qcc(df$defects, df$sample_size, type = "np", data.name = "defects")) | |
# Get the summary for the chart | |
summary(np_chart) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment