Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in summary.simcares when no reference class labels are used #109

Closed
svkucheryavski opened this issue Nov 15, 2022 · 1 comment
Closed
Assignees
Labels

Comments

@svkucheryavski
Copy link
Owner

Method summary() for simcares objects raises an error if the object is created by using method predict() without reference class values:

data(people)
Xc <- people[people[, 9] == -1, ]
Xt <- people[people[, 9] ==  1, ]

m <- simca(Xc, "male", 10)
r <- predict(m, Xt)
summary(r)

Results in:

Error in dimnames(x) <- dn : 
  length of 'dimnames' [2] not equal to array extent

The actual bug is in method as.matrix.simcares() which attempts at add column names to empty result matrix.

In fact summary() must not be used in this case as there are no figures of merits but the bug must be fixed (e.g. the method must show a warning). Low priority bug which will be fixed in next release.

@svkucheryavski
Copy link
Owner Author

fixed in last release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant