I am reading in data features
data_features<-as.matrix(read.table("file.csv", header=TRUE,fill=TRUE));
Then converting to matrix and getting rid of Inf data using library "functional"
dd <-as.matrix(data_xls)
dd[apply(dd, 1, Compose(is.finite, all)),]
Then I am executing rcorr:
rcorr(dd)
And that results in:
Error in rcorr(dd) : NA/NaN/Inf in foreign function call (arg 1)
In addition: Warning message:
In storage.mode(x) <- "double" : NAs introduced by coercion
Without the use of Compose from functional, I would have this problem when creating a matrix. Currently, I don't have it when creating the matrix but afterwards when executing rcorr.