selbouhaddani / OmicsPLS

R package for High dimensional data analysis and integration with O2PLS!
https://doi.org/10.1186/s12859-018-2371-3
31 stars 8 forks source link

Prnting the result of o2m2 resulst in an error #12

Closed krassowski closed 5 years ago

krassowski commented 5 years ago

Code:

r = o2m2(as.matrix(X), as.matrix(Y), 2, 0, 0) # works fine
print(r) # error

Error:

Error in if (x$flags$stripped) cat("O2PLS fit: Stripped \n") else if (x$flags$highd) cat("O2PLS fit: High dimensional \n") else cat("O2PLS fit \n") : argument is of length zero Calls: -> -> withVisible -> print -> print.o2m

But using:

r = o2m(as.matrix(X), as.matrix(Y), 2, 0, 0, p_thresh=0)
print(r)

works fine.

selbouhaddani commented 5 years ago

I added a new class pre.o2m and corresponding print function for o2m2 etc. Now printing should not give an error (but the print itself is not informative). I encourage general users to use o2m, since all generics are written for class o2m.

Now there seems to be another issue, that these o2m2 etc are not being set to internal (they should). Will look into this later.

krassowski commented 5 years ago

Thank you!