R/fct_core.R
second_noncon_analysis.RdGiven two data frames of sample data, column names, a nominal quantity, and a batch size, concatenates the two data frames, calculates the number of non-conformities, and determines whether the batch should be accepted or rejected.
second_noncon_analysis(
first_analysis_df,
first_analysis_col_name,
second_analysis_df,
second_analysis_col_name,
nominal_quantity,
batch_size
)A data frame containing the sample data from the first analysis.
A string representing the name of the column to analyze in the first analysis data frame.
A data frame containing the sample data from the second analysis.
A string representing the name of the column to analyze in the second analysis data frame.
A numeric value indicating the nominal quantity of the product being produced.
A numeric value indicating the size of the batch being produced.
A list with three elements: the decision on whether the batch should be accepted or rejected, the first analysis input data frame with a new column indicating whether each value in the column being analyzed is acceptable, non-conforming, or unacceptable, and the second analysis input data frame with a new column indicating whether each value in the column being analyzed is acceptable, non-conforming, or unacceptable.
first_df <- data.frame(value1 = c(rep(100, 25),c(99, 99, 99, 99, 91)))
second_df <- data.frame(value2 = c(rep(100, 25),c(99, 99, 99, 99, 91)))
result <- second_noncon_analysis(first_df, "value1", second_df, "value2", 100, 100)
result$decision
#> [1] "Accept"
result$df
#> NULL