qcc Package LSL and USL


i am new to knime and R. however i have some basic coding knowledge in c++.

I wanted to implement some SPC Analysis and found r qcc package.
i now have problems with the upper and lower limits. I assign variables to them. It seems that it works for the upper limit but not for the lower.

The numbers of the variables in the table are ok.

If i put in the actual numbers in the r-code instead of the variables, the resulting plot is correct. Using the variables like in the code below, it does not work, even though they are the same, like when i put them manually.

I cant find the error. Please guide me. 



# Load your data FROM A CSV FILE with one subgroup per row
my.data <- knime.in$"Actual"

# Draw the R Chart and calculate relevant metrics
#q1 <- qcc(my.data, type="R", nsigmas=3)
# Draw the X-Bar Chart and calculate relevant metrics
q2 <- qcc(my.data, type="xbar.one", nsigmas=3)
# Establish the LSL and USL as set by customer specs, then
# draw the process capability chart and calculate metrics:
lsl <- knime.in$"OT"# Fill in YOUR LSL here!
usl <- knime.in$"UT"# Fill in YOUR USL here!
process.capability(q2, spec.limits=c(lsl,usl))

Hi Deepdigger,

Can you please provide the workflow in which this is happening?





attached you may find the workflow. I hope this works as intended.

Hi Deepdigger,

Thank you for sharing your workflow.

Since you did not include the data, I can't exactly figure out what's wrong.

But from what I can gather, the problem might be because you are trying to pass columns for lsl and usl whereas process.capability() asks for two values. If this is indeed the problem, you should try to create those variables within the R node itself instead of passing them to it. This is easy since the parameters are stored in a list after the call to qcc()

Please try to use this code:

q2 <- qcc(my.data, type="xbar.one", nsigmas=3)
lsl <- q2$limits[1]
usl <- q2$limits[2]
process.capability(q2, spec.limits=c(lsl,usl))

Hope that helps!




Sorry i am new so i might not understand it completely.

This code produces a graph with symetric limits. I guess, It take the calculated limits fron q2?

However i need to assign them with variables for the dataset. This could also be asymetric.

If i use your code, i will always get a perfect distribution. see the resulting picture.

But the tolerances are -0/+0,1

this should be what i wanted, but it simply doesnt work.

#lsl <- knime.in$"OT"          (lsl would be 44.95, the value in the OT is correct)
#usl <- knime.in$"UT"         (usl would be 45.  the value in the UT is correct)

process.capability(q2, spec.limits=c(lsl,usl))

 *****  -> process.capability(q2, spec.limits=c(44.95,45))  -> however work :(

Hi Deepdigger,

If you need those values from your data rather than from qcc(), you need to first use a Table Row to Variable node so that you only have one value per column. Next, you should use two Math Formula (Variable) nodes instead of the regular Math Formula node so that you can pass the values to you R node as flow variables in addition to the data itself.



Ok thanks. i will try that!

Thank you RolandBurger, This worked :)


Thank you RolandBurger, This worked :)


This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.