svkucheryavski / mdatools

R package for Multivariate Data Analysis
https://mda.tools
Other
33 stars 11 forks source link

bug in `getRegcoeffs()` #108

Closed svkucheryavski closed 1 year ago

svkucheryavski commented 2 years ago

There is bug in getRegcoeffs.regmodel() method which leads to an error message if it is called for model created without scaling/standardization of training data. Here is the code to reproduce the bug:

library(mdatools)
data(people)

X <- people[, -4]
y <- people[, 4, drop = FALSE]

m <- pls(X, y, 10, cv = 1)
getRegcoeffs(m)

The error message is:

Error in rep(1, nrow(out)) : invalid 'times' argument
svkucheryavski commented 1 year ago

Fixed in 0.13.1.