Installing solution to bug 171 from GitHub

In future, please follow the Reproducible example template (found here). If you include your errors, we can better improve the package and user experience.

The code directly below is I’m assuming similar enough to you own, including the raised error:

library(mixOmics)
data(liver.toxicity)
X <- liver.toxicity$gene

object<-pca(X,ncomp=2)

cim(object)
#> Error in abs(mat$rotation): non-numeric argument to mathematical function

If you want to install the branch in which I have resolved the issue, include the follow lines right at the top (make sure that the devtools package is installed):

library(devtools)
install_github("mixOmicsTeam/mixOmics", ref = github_pull("176"))

This will allow you to use the cim() function on pca objects.

Hope this helps!
Max.