Open weijiexu-charlie opened 4 years ago
It's getting confused because Worker.id
is a character vector, rather than a factor or a number - note the lexicographic order in the print statement.
If you make your id a factor it should work normally.
Note that there might be deeper problems here. How many times in the codebase do I assume something is either a number or a factor?
Need to fix the immediate problem for print and plot, but also add plenty of test to the unit test suite to make sure all three kinds of grouping variable work.
Hi,
My code is as follows:
The powerSim function works well, but the powerCurve function gives me a quite strange result for
print(pc2)
:The
Worker.id
here is not monotonic, which may be the reason thatplot(pc2)
cannot return a plot as expected.Also, here's what the
summary(pc2)
function returns, which looks quite normal:Is there any possible reason for the weird results of
print(pc2)
andplot(pc2)
?Thanks!