[rkward-users] Pareto Analysis using RKward

Thomas Friedrichsmeier thomas.friedrichsmeier at ruhr-uni-bochum.de
Sun Jun 5 10:11:26 UTC 2011

On Sunday 05 June 2011, Vikas Garud wrote:
> I tried to generate a list for cumulated defects by:
> cumulated.defects <- by (my.csv.data$Defect, my.csv.data$Defect, FUN=count)
> (Probably shows my ignorance about using R)
> And got error:
> Error in FUN(X[[1L]], ...) : object 'count' not found
> Calls: by ... by.default -> eval -> eval -> tapply -> lapply -> FUN

Well, you could do
  cumulated.defects <- by (my.csv.data$Defect, my.csv.data$Defect, FUN=length) 
although the more natural way would simply be
  cumulated.defects <- table (my.csv.data$Defect)
. BTW, this is also what out plugin currently does, when you check the 
"tabulate" option. Thus you may want to click the "Code"-button in the dialog, 
and inspect how things are done, there. That's what it's there, for.
> One more observation:  In traditional Pareto Chart, the Others
> category is at the end.  In the Pareto Chart drawn by using this
> script, the "Others" category appears somewhere in the  middle - in
> sorted order.  Can this be taken towards the end?

Not easily from our end, no, as pareto.chart() always sorts the data.

However, this would not be too hard to add to pareto.chart(), directly. You 
might want to contact the maintainer of the qcc-package about this (Luca 
Scrucca; luca AT stat.unipg.it). It would seem like a useful addition.

> Is there a way to get the computed vectors (The cost total) in the
> data?

my.data$computed <- computed[match (my.data$category, names(computed))

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/rkward-users/attachments/20110605/62c34d7e/attachment.sig>

More information about the Rkward-users mailing list